summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs-common.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-09-14 02:39:11 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-14 02:32:03 -0700
commit9ff89d858075d8f916c76a9ade84b9844da4d23e (patch)
tree535ea0f8456078a74eeeb920edc646cf58c9beee /xlators/nfs/server/src/nfs-common.c
parent2152dae595438b919fbcb7349d15ead139e120d8 (diff)
nfs,nfs3,mnt3: Transition fh resolution to gfid
Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/nfs/server/src/nfs-common.c')
-rw-r--r--xlators/nfs/server/src/nfs-common.c20
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 */