diff options
Diffstat (limited to 'xlators/nfs/server/src/nfs-common.c')
-rw-r--r-- | xlators/nfs/server/src/nfs-common.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c index 9f68f714649..970eb41c571 100644 --- a/xlators/nfs/server/src/nfs-common.c +++ b/xlators/nfs/server/src/nfs-common.c @@ -264,9 +264,8 @@ err: return ret; } - int -nfs_ino_loc_fill (inode_table_t *itable, uint64_t ino, uint64_t gen, loc_t *loc) +nfs_gfid_loc_fill (inode_table_t *itable, uuid_t gfid, loc_t *loc) { int ret = -EFAULT; inode_t *inode = NULL; @@ -274,7 +273,7 @@ nfs_ino_loc_fill (inode_table_t *itable, uint64_t ino, uint64_t gen, loc_t *loc) if (!loc) return ret; - inode = inode_get (itable, ino, gen); + inode = inode_find (itable, gfid); if (!inode) { ret = -ENOENT; goto err; @@ -290,6 +289,17 @@ err: int +nfs_root_loc_fill (inode_table_t *itable, loc_t *loc) +{ + uuid_t rootgfid = {0, }; + + rootgfid[15] = 1; + return nfs_gfid_loc_fill (itable, rootgfid, loc); +} + + + +int nfs_parent_inode_loc_fill (inode_t *parent, inode_t *entryinode, char *entry, loc_t *loc) { @@ -317,7 +327,7 @@ err: * On other errors, return -3. 0 on success. */ int -nfs_entry_loc_fill (inode_table_t *itable, ino_t ino, uint64_t gen, char *entry, +nfs_entry_loc_fill (inode_table_t *itable, uuid_t pargfid, char *entry, loc_t *loc, int how) { inode_t *parent = NULL; @@ -329,7 +339,7 @@ nfs_entry_loc_fill (inode_table_t *itable, ino_t ino, uint64_t gen, char *entry, if ((!itable) || (!entry) || (!loc)) return ret; - parent = inode_get (itable, ino, gen); + parent = inode_find (itable, pargfid); ret = -1; /* Will need hard resolution now */ |