client->flush_set_callback(oset);
}
+bool Client::is_reserved_vino(vinodeno_t &vino) {
+ if (vino.ino < MDS_INO_SYSTEM_BASE && vino.ino != MDS_INO_ROOT) {
+ ldout(cct, -1) << __func__ << "attempt to access reserved inode number " << vino << dendl;
+ return true;
+ }
+ return false;
+}
+
// -------------
if (unmounting)
return -ENOTCONN;
+ if (is_reserved_vino(vino))
+ return -ESTALE;
+
MetaRequest *req = new MetaRequest(CEPH_MDS_OP_LOOKUPINO);
filepath path(vino.ino);
req->set_filepath(path);
if (unmounting)
return -ENOTCONN;
+ if (is_reserved_vino(vino))
+ return -ESTALE;
+
std::lock_guard lock(client_lock);
ldout(cct, 3) << __func__ << vino << dendl;
if (unmounting)
return NULL;
+ if (is_reserved_vino(vino))
+ return NULL;
+
unordered_map<vinodeno_t,Inode*>::iterator p = inode_map.find(vino);
if (p == inode_map.end())
return NULL;
static const VXattr _common_vxattrs[];
+ bool is_reserved_vino(vinodeno_t &vino);
void fill_dirent(struct dirent *de, const char *name, int type, uint64_t ino, loff_t next_off);