diff options
author | Soumya Koduri <skoduri@redhat.com> | 2015-07-10 11:23:07 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-07-10 10:42:26 -0700 |
commit | 2992c18c1370ada476223b496e4e970d70cdd359 (patch) | |
tree | 7df2ec2afc8811edc7c77089946afbec4f06b214 /libglusterfs/src | |
parent | 11ac70c8b6aefe3e82b7f1bd3f661206465c3ef8 (diff) |
syncop: Include iatt to 'syncop_link' args
Include iatt to 'syncop_link' args to fetch proper attributes of
the newly linked inode.
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Change-Id: If6b92961bd7a89add3791ed3a9b494087348b492
BUG: 1241788
Reviewed-on: http://review.gluster.org/11611
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/syncop.c | 10 | ||||
-rw-r--r-- | libglusterfs/src/syncop.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index 9b0d7aa745a..7c0ec7799e7 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -2157,6 +2157,9 @@ syncop_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (xdata) args->xdata = dict_ref (xdata); + if (buf) + args->iatt1 = *buf; + __wake (args); return 0; @@ -2164,14 +2167,17 @@ syncop_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int -syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc, dict_t *xdata_in, - dict_t **xdata_out) +syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc, struct iatt *iatt, + dict_t *xdata_in, dict_t **xdata_out) { struct syncargs args = {0, }; SYNCOP (subvol, (&args), syncop_link_cbk, subvol->fops->link, oldloc, newloc, xdata_in); + if (iatt) + *iatt = args.iatt1; + if (xdata_out) *xdata_out = args.xdata; else if (args.xdata) diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index 2cdedc0fc11..8afc68e7f21 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -475,7 +475,7 @@ int syncop_mkdir (xlator_t *subvol, loc_t *loc, mode_t mode, struct iatt *iatt, dict_t *xdata_in, dict_t **xdata_out); int syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc, - dict_t *xdata_in, dict_t **xdata_out); + struct iatt *iatt, dict_t *xdata_in, dict_t **xdata_out); int syncop_fsyncdir (xlator_t *subvol, fd_t *fd, int datasync, dict_t *xdata_in, dict_t **xdata_out); |