summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-resolve.c
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-09-03 14:00:32 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-04 01:45:29 -0700
commit8a5e677bbd8bdec555e6699ec5b8b1a66fe8096d (patch)
tree13039297cdc0818f9a817dea9459604476ca6ec6 /xlators/mount/fuse/src/fuse-resolve.c
parenta7fd7dbed9b995c173664bcadf3d2e5b6131e4ea (diff)
gfid: set request gfids for new entries in fuse
Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@blackhole.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/mount/fuse/src/fuse-resolve.c')
-rw-r--r--xlators/mount/fuse/src/fuse-resolve.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-resolve.c b/xlators/mount/fuse/src/fuse-resolve.c
index 77a55cd70..3bdc0b929 100644
--- a/xlators/mount/fuse/src/fuse-resolve.c
+++ b/xlators/mount/fuse/src/fuse-resolve.c
@@ -689,11 +689,36 @@ gf_resolve_all (fuse_state_t *state)
int
+fuse_gfid_set (fuse_state_t *state)
+{
+ int ret = 0;
+
+ if (uuid_is_null (state->gfid))
+ goto out;
+
+ if (!state->dict)
+ state->dict = dict_new ();
+
+ if (!state->dict) {
+ ret = -1;
+ goto out;
+ }
+
+ ret = dict_set_static_bin (state->dict, "gfid-req",
+ state->gfid, sizeof (state->gfid));
+out:
+ return ret;
+}
+
+
+int
fuse_resolve_and_resume (fuse_state_t *state, fuse_resume_fn_t fn)
{
xlator_t *inode_xl = NULL;
xlator_t *active_xl = NULL;
+ fuse_gfid_set (state);
+
state->resume_fn = fn;
active_xl = fuse_active_subvol (state->this);