summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-10-12 09:12:45 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-12 10:18:35 -0700
commit0f177f59d199484a15490359f6db69bfa8dff82d (patch)
tree1e7f2939b4eff194f16d68cf482d58b5d2512652 /xlators
parent5cec042dfa7d7c9699d3110f849a78b2569aa8d9 (diff)
protocol/server: Set preparent and postparent in the response struct.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
Diffstat (limited to 'xlators')
-rw-r--r--xlators/protocol/server/src/server-protocol.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index 06bc31ce0..a6017d236 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -484,6 +484,9 @@ server_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret >= 0) {
gf_stat_from_stat (&rsp->stat, stbuf);
+ gf_stat_from_stat (&rsp->preparent, preparent);
+ gf_stat_from_stat (&rsp->postparent, postparent);
+
inode_link (inode, state->loc.parent, state->loc.name, stbuf);
inode_lookup (inode);
} else {
@@ -536,6 +539,9 @@ server_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret >= 0) {
gf_stat_from_stat (&rsp->stat, stbuf);
+ gf_stat_from_stat (&rsp->preparent, preparent);
+ gf_stat_from_stat (&rsp->postparent, postparent);
+
inode_link (inode, state->loc.parent, state->loc.name, stbuf);
inode_lookup (inode);
} else {
@@ -1274,6 +1280,9 @@ server_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret >= 0) {
gf_stat_from_stat (&rsp->stat, stbuf);
+ gf_stat_from_stat (&rsp->preparent, preparent);
+ gf_stat_from_stat (&rsp->postparent, postparent);
+
inode_link (inode, state->loc.parent, state->loc.name, stbuf);
inode_lookup (inode);
} else {
@@ -1327,7 +1336,11 @@ server_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (op_ret == 0) {
stbuf->st_ino = state->loc.inode->ino;
+
gf_stat_from_stat (&rsp->stat, stbuf);
+ gf_stat_from_stat (&rsp->preparent, preparent);
+ gf_stat_from_stat (&rsp->postparent, postparent);
+
gf_log (state->bound_xl->name, GF_LOG_TRACE,
"%"PRId64": LINK (%"PRId64") %"PRId64"/%s ==> %"PRId64"/%s",
frame->root->unique, inode->ino,
@@ -1862,8 +1875,11 @@ server_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
hdr->rsp.op_errno = hton32 (gf_errno);
rsp->fd = hton64 (state->fd_no);
- if (op_ret >= 0)
+ if (op_ret >= 0) {
gf_stat_from_stat (&rsp->stat, stbuf);
+ gf_stat_from_stat (&rsp->preparent, preparent);
+ gf_stat_from_stat (&rsp->postparent, postparent);
+ }
server_loc_wipe (&(state->loc));