diff options
author | Anand Avati <avati@gluster.com> | 2010-09-03 14:00:32 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:29 -0700 |
commit | 8a5e677bbd8bdec555e6699ec5b8b1a66fe8096d (patch) | |
tree | 13039297cdc0818f9a817dea9459604476ca6ec6 /xlators/mount/fuse/src/fuse-resolve.c | |
parent | a7fd7dbed9b995c173664bcadf3d2e5b6131e4ea (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.c | 25 |
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 77a55cd701f..3bdc0b9293e 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); |