From 9d3af972f516b6ba38d2736ce2016e34a452d569 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 20 Mar 2012 17:22:24 +0530 Subject: core: adding extra data for fops with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/nfs/server/src/nfs-fops.c | 152 +++++++++++++++++++--------------- xlators/nfs/server/src/nfs-fops.h | 2 +- xlators/nfs/server/src/nfs-generics.c | 2 +- xlators/nfs/server/src/nfs-inodes.c | 46 +++++----- xlators/nfs/server/src/nfs-inodes.h | 2 +- xlators/nfs/server/src/nfs3.c | 67 ++++++++------- xlators/nfs/server/src/nlm4.c | 18 ++-- 7 files changed, 160 insertions(+), 129 deletions(-) (limited to 'xlators/nfs/server') diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c index 1dc07f39..6e2b3348 100644 --- a/xlators/nfs/server/src/nfs-fops.c +++ b/xlators/nfs/server/src/nfs-fops.c @@ -353,14 +353,14 @@ err: int32_t nfs_fop_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno) + int32_t op_ret, int32_t op_errno, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_access_cbk_t progcbk = NULL; nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno); + progcbk (frame, cookie, this, op_ret, op_errno, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -385,7 +385,7 @@ nfs_fop_access (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, accessbits = nfs3_request_to_accessbits (accesstest); STACK_WIND_COOKIE (frame, nfs_fop_access_cbk, xl, xl, xl->fops->access, - loc, accessbits); + loc, accessbits, NULL); ret = 0; err: if (ret < 0) { @@ -398,7 +398,8 @@ err: int32_t nfs_fop_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_stat_cbk_t progcbk = NULL; @@ -406,7 +407,7 @@ nfs_fop_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, buf, NULL, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, buf); + progcbk (frame, cookie, this, op_ret, op_errno, buf, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -430,7 +431,7 @@ nfs_fop_stat (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, nfs_fop_save_root_ino (nfl, loc); STACK_WIND_COOKIE (frame, nfs_fop_stat_cbk, xl, xl, xl->fops->stat, - loc); + loc, NULL); ret = 0; err: if (ret < 0) { @@ -444,7 +445,8 @@ err: int32_t nfs_fop_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_fstat_cbk_t progcbk = NULL; @@ -452,7 +454,7 @@ nfs_fop_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, buf, NULL, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, buf); + progcbk (frame, cookie, this, op_ret, op_errno, buf, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -476,7 +478,7 @@ nfs_fop_fstat (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, nfs_fop_save_root_fd_ino (nfl, fd); STACK_WIND_COOKIE (frame, nfs_fop_fstat_cbk, xl, xl, xl->fops->fstat, - fd); + fd, NULL); ret = 0; err: @@ -491,14 +493,14 @@ err: int32_t nfs_fop_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, fd_t *fd) + int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_opendir_cbk_t progcbk = NULL; nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, fd); + progcbk (frame, cookie, this, op_ret, op_errno, fd, xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -520,7 +522,7 @@ nfs_fop_opendir (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_handle_local_init (frame, nfsx, nfl, cbk, local, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_opendir_cbk, xl, xl, - xl->fops->opendir, pathloc, dirfd); + xl->fops->opendir, pathloc, dirfd, NULL); ret = 0; err: @@ -534,14 +536,14 @@ err: int nfs_fop_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno) + int32_t op_ret, int32_t op_errno, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_flush_cbk_t progcbk = NULL; nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno); + progcbk (frame, cookie, this, op_ret, op_errno, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -563,7 +565,7 @@ nfs_fop_flush (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, nfs_fop_handle_local_init (frame, nfsx, nfl, cbk, local, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_flush_cbk, xl, xl, xl->fops->flush, - fd); + fd, NULL); ret = 0; err: if (ret < 0) { @@ -577,14 +579,15 @@ err: int32_t nfs_fop_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, gf_dirent_t *entries) + int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_readdirp_cbk_t progcbk = NULL; nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, entries); + progcbk (frame, cookie, this, op_ret, op_errno, entries, xdata); nfs_stack_destroy (nfl, frame); @@ -624,7 +627,8 @@ err: int32_t nfs_fop_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct statvfs *buf) + int32_t op_ret, int32_t op_errno, struct statvfs *buf, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; @@ -632,7 +636,7 @@ nfs_fop_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, buf); + progcbk (frame, cookie, this, op_ret, op_errno, buf, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -655,7 +659,7 @@ nfs_fop_statfs (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_handle_local_init (frame, nfsx, nfl, cbk, local, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_statfs_cbk, xl, xl, - xl->fops->statfs, pathloc); + xl->fops->statfs, pathloc, NULL); ret = 0; err: if (ret < 0) { @@ -671,7 +675,7 @@ int32_t nfs_fop_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_create_cbk_t progcbk = NULL; @@ -681,7 +685,7 @@ nfs_fop_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, fd, inode, buf, - preparent, postparent); + preparent, postparent, NULL); nfs_stack_destroy (nfl, frame); return 0; @@ -707,7 +711,7 @@ nfs_fop_create (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_gfid_setup (nfl, pathloc->inode, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_create_cbk, xl, xl, xl->fops->create, - pathloc, flags, mode, fd, nfl->dictgfid); + pathloc, flags, mode, 0, fd, nfl->dictgfid); ret = 0; err: @@ -723,7 +727,7 @@ err: int32_t nfs_fop_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *pre, - struct iatt *post) + struct iatt *post, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_setattr_cbk_t progcbk = NULL; @@ -731,7 +735,8 @@ nfs_fop_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, pre, post, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, pre, post); + progcbk (frame, cookie, this, op_ret, op_errno, pre, post, + xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -756,7 +761,7 @@ nfs_fop_setattr (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_save_root_ino (nfl, pathloc); STACK_WIND_COOKIE (frame, nfs_fop_setattr_cbk, xl, xl, - xl->fops->setattr, pathloc, buf, valid); + xl->fops->setattr, pathloc, buf, valid, NULL); ret = 0; err: if (ret < 0) { @@ -772,7 +777,7 @@ int32_t nfs_fop_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_mkdir_cbk_t progcbk = NULL; @@ -781,7 +786,7 @@ nfs_fop_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfs_fop_restore_root_ino (nfl, op_ret, buf, NULL,preparent, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -805,7 +810,7 @@ nfs_fop_mkdir (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_gfid_setup (nfl, pathloc->inode, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_mkdir_cbk, xl, xl, xl->fops->mkdir, - pathloc, mode, nfl->dictgfid); + pathloc, mode, 0, nfl->dictgfid); ret = 0; err: if (ret < 0) { @@ -821,7 +826,7 @@ int32_t nfs_fop_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_symlink_cbk_t progcbk = NULL; @@ -830,7 +835,7 @@ nfs_fop_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfs_fop_restore_root_ino (nfl, op_ret,buf, NULL, preparent, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -853,7 +858,8 @@ nfs_fop_symlink (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, char *target, nfs_fop_gfid_setup (nfl, pathloc->inode, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_symlink_cbk, xl, xl, - xl->fops->symlink, target, pathloc, nfl->dictgfid); + xl->fops->symlink, target, pathloc, + 0, nfl->dictgfid); ret = 0; err: if (ret < 0) { @@ -868,7 +874,7 @@ err: int32_t nfs_fop_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, const char *path, - struct iatt *buf) + struct iatt *buf, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_readlink_cbk_t progcbk = NULL; @@ -876,7 +882,8 @@ nfs_fop_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, buf, NULL, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, path, buf); + progcbk (frame, cookie, this, op_ret, op_errno, path, buf, + xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -899,7 +906,7 @@ nfs_fop_readlink (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_save_root_ino (nfl, pathloc); STACK_WIND_COOKIE (frame, nfs_fop_readlink_cbk, xl, xl, - xl->fops->readlink, pathloc, size); + xl->fops->readlink, pathloc, size, NULL); ret = 0; err: if (ret < 0) { @@ -915,7 +922,7 @@ int32_t nfs_fop_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_mknod_cbk_t progcbk = NULL; @@ -924,7 +931,7 @@ nfs_fop_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfs_fop_restore_root_ino (nfl, op_ret,buf, NULL, preparent, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -948,7 +955,7 @@ nfs_fop_mknod (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_gfid_setup (nfl, pathloc->inode, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_mknod_cbk, xl, xl, xl->fops->mknod, - pathloc, mode, dev, nfl->dictgfid); + pathloc, mode, dev, 0, nfl->dictgfid); ret = 0; err: if (ret < 0) { @@ -962,7 +969,7 @@ err: int32_t nfs_fop_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = frame->local; fop_rmdir_cbk_t progcbk = NULL; @@ -972,7 +979,7 @@ nfs_fop_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, preparent, - postparent); + postparent, NULL); nfs_stack_destroy (nfl, frame); return 0; } @@ -996,7 +1003,7 @@ nfs_fop_rmdir (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_save_root_ino (nfl, pathloc); STACK_WIND_COOKIE (frame, nfs_fop_rmdir_cbk, xl, xl, xl->fops->rmdir, - pathloc, 0); + pathloc, 0, NULL); ret = 0; err: if (ret < 0) { @@ -1012,7 +1019,7 @@ err: int32_t nfs_fop_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = frame->local; fop_unlink_cbk_t progcbk = NULL; @@ -1022,7 +1029,7 @@ nfs_fop_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, preparent, - postparent); + postparent, xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -1045,7 +1052,7 @@ nfs_fop_unlink (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, nfs_fop_save_root_ino (nfl, pathloc); STACK_WIND_COOKIE (frame, nfs_fop_unlink_cbk, xl, xl, - xl->fops->unlink, pathloc); + xl->fops->unlink, pathloc, 0, NULL); ret = 0; err: if (ret < 0) { @@ -1062,7 +1069,7 @@ int32_t nfs_fop_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_link_cbk_t progcbk = NULL; @@ -1072,7 +1079,7 @@ nfs_fop_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, postparent); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -1097,7 +1104,7 @@ nfs_fop_link (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *oldloc, nfs_fop_save_root_ino (nfl, newloc); STACK_WIND_COOKIE (frame, nfs_fop_link_cbk, xl, xl, xl->fops->link, - oldloc, newloc); + oldloc, newloc, NULL); ret = 0; err: if (ret < 0) { @@ -1113,7 +1120,8 @@ int32_t nfs_fop_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, - struct iatt *prenewparent, struct iatt *postnewparent) + struct iatt *prenewparent, struct iatt *postnewparent, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; @@ -1131,7 +1139,7 @@ nfs_fop_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, buf, preoldparent, postoldparent, prenewparent, - postnewparent); + postnewparent, xdata); nfs_stack_destroy (nfl, frame); return 0; } @@ -1156,7 +1164,7 @@ nfs_fop_rename (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *oldloc, nfs_fop_newloc_save_root_ino (nfl, newloc); STACK_WIND_COOKIE (frame, nfs_fop_rename_cbk, xl, xl, - xl->fops->rename, oldloc, newloc); + xl->fops->rename, oldloc, newloc, NULL); ret = 0; err: if (ret < 0) { @@ -1170,14 +1178,14 @@ err: int32_t nfs_fop_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, fd_t *fd) + int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_open_cbk_t progcbk = NULL; nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, fd); + progcbk (frame, cookie, this, op_ret, op_errno, fd, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -1185,7 +1193,7 @@ nfs_fop_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int nfs_fop_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, - int32_t flags, fd_t *fd, int32_t wbflags, fop_open_cbk_t cbk, + int32_t flags, fd_t *fd, fop_open_cbk_t cbk, void *local) { call_frame_t *frame = NULL; @@ -1200,7 +1208,7 @@ nfs_fop_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, nfs_fop_handle_local_init (frame, nfsx, nfl, cbk, local, ret, err); STACK_WIND_COOKIE (frame, nfs_fop_open_cbk, xl, xl, xl->fops->open, - loc, flags, fd, wbflags); + loc, flags, fd, NULL); ret = 0; err: if (ret < 0) { @@ -1215,7 +1223,7 @@ err: int32_t nfs_fop_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_writev_cbk_t progcbk = NULL; @@ -1223,7 +1231,8 @@ nfs_fop_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, prebuf, postbuf, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, prebuf,postbuf); + progcbk (frame, cookie, this, op_ret, op_errno, prebuf, + postbuf, xdata); nfs_stack_destroy (nfl, frame); @@ -1257,7 +1266,7 @@ nfs_fop_write (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, iobref_add (nfl->iobref, srciob); */ STACK_WIND_COOKIE (frame, nfs_fop_writev_cbk, xl, xl,xl->fops->writev, - fd, vector, count, offset, 0, srciobref); + fd, vector, count, offset, 0, srciobref, NULL); ret = 0; err: if (ret < 0) { @@ -1272,7 +1281,7 @@ err: int32_t nfs_fop_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_fsync_cbk_t progcbk = NULL; @@ -1280,7 +1289,9 @@ nfs_fop_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, prebuf, postbuf, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, prebuf,postbuf); + progcbk (frame, cookie, this, op_ret, op_errno, prebuf, + postbuf, xdata); + nfs_stack_destroy (nfl, frame); return 0; } @@ -1303,7 +1314,7 @@ nfs_fop_fsync (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, nfs_fop_save_root_fd_ino (nfl, fd); STACK_WIND_COOKIE (frame, nfs_fop_fsync_cbk, xl, xl, - xl->fops->fsync, fd, datasync); + xl->fops->fsync, fd, datasync, NULL); ret = 0; err: if (ret < 0) { @@ -1318,7 +1329,8 @@ err: int32_t nfs_fop_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iovec *vector, - int32_t count, struct iatt *stbuf, struct iobref *iobref) + int32_t count, struct iatt *stbuf, struct iobref *iobref, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_readv_cbk_t progcbk = NULL; @@ -1327,7 +1339,7 @@ nfs_fop_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfs_fop_restore_root_ino (nfl, op_ret, stbuf, NULL, NULL, NULL); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, vector, count, - stbuf, iobref); + stbuf, iobref, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -1350,7 +1362,7 @@ nfs_fop_read (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, nfs_fop_save_root_fd_ino (nfl, fd); STACK_WIND_COOKIE (frame, nfs_fop_readv_cbk, xl, xl, xl->fops->readv, - fd, size, offset, 0); + fd, size, offset, 0, NULL); ret = 0; err: if (ret < 0) { @@ -1363,7 +1375,8 @@ err: int32_t nfs_fop_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct gf_flock *flock) + int32_t op_ret, int32_t op_errno, struct gf_flock *flock, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_lk_cbk_t progcbk = NULL; @@ -1376,7 +1389,7 @@ nfs_fop_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this, fd_unref (nfl->fd); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, flock); + progcbk (frame, cookie, this, op_ret, op_errno, flock, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -1402,7 +1415,7 @@ nfs_fop_lk (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, nfl->flock = *flock; STACK_WIND_COOKIE (frame, nfs_fop_lk_cbk, xl, xl, xl->fops->lk, - fd, cmd, flock); + fd, cmd, flock, NULL); ret = 0; err: if (ret < 0) { @@ -1417,7 +1430,7 @@ err: int32_t nfs_fop_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_truncate_cbk_t progcbk = NULL; @@ -1425,7 +1438,8 @@ nfs_fop_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, nfl_to_prog_data (nfl, progcbk, frame); nfs_fop_restore_root_ino (nfl, op_ret, prebuf, postbuf, NULL, NULL); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, prebuf,postbuf); + progcbk (frame, cookie, this, op_ret, op_errno, prebuf, + postbuf, xdata); nfs_stack_destroy (nfl, frame); return 0; @@ -1448,7 +1462,7 @@ nfs_fop_truncate (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, nfs_fop_save_root_ino (nfl, loc); STACK_WIND_COOKIE (frame, nfs_fop_truncate_cbk, xl, xl, - xl->fops->truncate, loc, offset); + xl->fops->truncate, loc, offset, NULL); ret = 0; err: diff --git a/xlators/nfs/server/src/nfs-fops.h b/xlators/nfs/server/src/nfs-fops.h index f86a66b2..b8280593 100644 --- a/xlators/nfs/server/src/nfs-fops.h +++ b/xlators/nfs/server/src/nfs-fops.h @@ -189,7 +189,7 @@ nfs_fop_write (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, extern int nfs_fop_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, - int32_t flags, fd_t *fd, int32_t wbflags, fop_open_cbk_t cbk, + int32_t flags, fd_t *fd, fop_open_cbk_t cbk, void *local); extern int diff --git a/xlators/nfs/server/src/nfs-generics.c b/xlators/nfs/server/src/nfs-generics.c index dbb79fc9..553cc7f3 100644 --- a/xlators/nfs/server/src/nfs-generics.c +++ b/xlators/nfs/server/src/nfs-generics.c @@ -192,7 +192,7 @@ nfs_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, if ((!nfsx) || (!xl) || (!pathloc) || (!nfu)) return ret; - ret = nfs_inode_open (nfsx, xl, nfu, pathloc, flags, GF_OPEN_NOWB, cbk, + ret = nfs_inode_open (nfsx, xl, nfu, pathloc, flags, cbk, local); return ret; } diff --git a/xlators/nfs/server/src/nfs-inodes.c b/xlators/nfs/server/src/nfs-inodes.c index 4867dd71..c9bf3720 100644 --- a/xlators/nfs/server/src/nfs-inodes.c +++ b/xlators/nfs/server/src/nfs-inodes.c @@ -70,7 +70,7 @@ int32_t nfs_inode_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode , struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = frame->local; fop_create_cbk_t progcbk = NULL; @@ -90,7 +90,7 @@ do_not_link: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, fd, inode, buf, - preparent, postparent); + preparent, postparent, xdata); if (linked_inode) { inode_lookup (linked_inode); @@ -142,7 +142,7 @@ int32_t nfs_inode_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = frame->local; fop_mkdir_cbk_t progcbk = NULL; @@ -157,7 +157,7 @@ do_not_link: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); if (linked_inode) { inode_lookup (linked_inode); @@ -193,7 +193,7 @@ err: int32_t nfs_inode_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, fd_t *fd) + int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; @@ -209,14 +209,14 @@ nfs_inode_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, */ inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, fd); + progcbk (frame, cookie, this, op_ret, op_errno, fd, xdata); return 0; } int nfs_inode_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, - int32_t flags, int32_t wbflags, fop_open_cbk_t cbk, void *local) + int32_t flags, fop_open_cbk_t cbk, void *local) { struct nfs_fop_local *nfl = NULL; fd_t *newfd = NULL; @@ -233,7 +233,7 @@ nfs_inode_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, } nfs_fop_handle_local_init (NULL, nfsx, nfl, cbk, local, ret, fd_err); - ret = nfs_fop_open (nfsx, xl, nfu, loc, flags, newfd, wbflags, + ret = nfs_fop_open (nfsx, xl, nfu, loc, flags, newfd, nfs_inode_open_cbk, nfl); if (ret < 0) @@ -255,7 +255,8 @@ int32_t nfs_inode_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, - struct iatt *prenewparent, struct iatt *postnewparent) + struct iatt *prenewparent, struct iatt *postnewparent, + dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_rename_cbk_t progcbk = NULL; @@ -272,7 +273,7 @@ do_not_link: if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, buf, preoldparent, postoldparent, prenewparent, - postnewparent); + postnewparent, xdata); return 0; } @@ -305,7 +306,7 @@ int32_t nfs_inode_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_link_cbk_t progcbk = NULL; @@ -321,7 +322,7 @@ do_not_link: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); if (linked_inode) { inode_lookup (linked_inode); @@ -358,7 +359,7 @@ err: int32_t nfs_inode_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_unlink_cbk_t progcbk = NULL; @@ -375,7 +376,7 @@ do_not_unlink: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, preparent, - postparent); + postparent, xdata); return 0; } @@ -406,7 +407,7 @@ err: int32_t nfs_inode_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_rmdir_cbk_t progcbk = NULL; @@ -423,7 +424,7 @@ do_not_unlink: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, preparent, - postparent); + postparent, xdata); return 0; } @@ -456,7 +457,7 @@ int32_t nfs_inode_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_mknod_cbk_t progcbk = NULL; @@ -473,7 +474,7 @@ do_not_link: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); if (linked_inode) { inode_lookup (linked_inode); @@ -513,7 +514,7 @@ int32_t nfs_inode_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; fop_symlink_cbk_t progcbk = NULL; @@ -529,7 +530,7 @@ do_not_link: inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) progcbk (frame, cookie, this, op_ret, op_errno, inode, buf, - preparent, postparent); + preparent, postparent, xdata); if (linked_inode) { inode_lookup (linked_inode); @@ -565,7 +566,7 @@ err: int32_t nfs_inode_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, fd_t *fd) + int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata) { struct nfs_fop_local *nfl = NULL; @@ -579,7 +580,8 @@ nfs_inode_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, inodes_nfl_to_prog_data (nfl, progcbk, frame); if (progcbk) - progcbk (frame, cookie, this, op_ret, op_errno, fd); + progcbk (frame, cookie, this, op_ret, op_errno, fd, xdata); + return 0; } diff --git a/xlators/nfs/server/src/nfs-inodes.h b/xlators/nfs/server/src/nfs-inodes.h index 12c8eec0..7c962b33 100644 --- a/xlators/nfs/server/src/nfs-inodes.h +++ b/xlators/nfs/server/src/nfs-inodes.h @@ -48,7 +48,7 @@ nfs_inode_mkdir (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *pathloc, extern int nfs_inode_open (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, loc_t *loc, - int32_t flags, int32_t wbflags, fop_open_cbk_t cbk, + int32_t flags, fop_open_cbk_t cbk, void *local); extern int diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c index 69cd3f78..75375f36 100644 --- a/xlators/nfs/server/src/nfs3.c +++ b/xlators/nfs/server/src/nfs3.c @@ -713,7 +713,8 @@ nfs3svc_getattr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t nfs3svc_getattr_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { nfsstat3 status = NFS3_OK; nfs3_call_state_t *cs = NULL; @@ -875,7 +876,7 @@ nfs3_setattr_reply (rpcsvc_request_t *req, nfsstat3 stat, struct iatt *preop, int32_t nfs3svc_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; struct iatt *prestat = NULL; @@ -913,7 +914,7 @@ nfs3err: int32_t nfs3svc_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preop, - struct iatt *postop) + struct iatt *postop, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -1; @@ -967,7 +968,8 @@ nfs3err: int32_t nfs3svc_setattr_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { int ret = -EFAULT; @@ -1479,7 +1481,7 @@ nfs3_access_reply (rpcsvc_request_t *req, nfsstat3 status, int32_t accbits) int32_t nfs3svc_access_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno) + int32_t op_ret, int32_t op_errno, dict_t *xdata) { nfsstat3 status = NFS3_OK; nfs3_call_state_t *cs = NULL; @@ -1616,7 +1618,7 @@ nfs3_readlink_reply (rpcsvc_request_t *req, nfsstat3 stat, char *path, int32_t nfs3svc_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, const char *path, - struct iatt *buf) + struct iatt *buf, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -1781,7 +1783,8 @@ nfs3_read_reply (rpcsvc_request_t *req, nfsstat3 stat, count3 count, int32_t nfs3svc_read_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iovec *vector, - int32_t count, struct iatt *stbuf, struct iobref *iobref) + int32_t count, struct iatt *stbuf, struct iobref *iobref, + dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int is_eof = 0; @@ -1965,7 +1968,7 @@ nfs3_write_reply (rpcsvc_request_t *req, nfsstat3 stat, count3 count, int32_t nfs3svc_write_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf, dict_t *xdata) { struct nfs3_state *nfs3 = NULL; nfsstat3 stat = NFS3ERR_SERVERFAULT; @@ -2061,7 +2064,7 @@ err: int32_t nfs3svc_write_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -EFAULT; @@ -2326,7 +2329,7 @@ nfs3_create_reply (rpcsvc_request_t *req, nfsstat3 stat, struct nfs3_fh *newfh, int32_t nfs3svc_create_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct iatt *preop, struct iatt *postop) + struct iatt *preop, struct iatt *postop, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -2356,7 +2359,7 @@ int32_t nfs3svc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -EFAULT; @@ -2459,7 +2462,8 @@ nfs3_create_common (nfs3_call_state_t *cs) int32_t nfs3svc_create_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { int ret = -EFAULT; nfsstat3 stat = NFS3ERR_SERVERFAULT; @@ -2684,7 +2688,7 @@ nfs3_mkdir_reply (rpcsvc_request_t *req, nfsstat3 stat, struct nfs3_fh *fh, int32_t nfs3svc_mkdir_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct iatt *preop, struct iatt *postop) + struct iatt *preop, struct iatt *postop, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -2714,7 +2718,7 @@ int32_t nfs3svc_mkdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -EFAULT; @@ -2894,7 +2898,7 @@ int32_t nfs3svc_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -3056,7 +3060,7 @@ nfs3_mknod_reply (rpcsvc_request_t *req, nfsstat3 stat, struct nfs3_fh *fh, int32_t nfs3svc_mknod_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct iatt *preop, struct iatt *postop) + struct iatt *preop, struct iatt *postop, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -3086,7 +3090,7 @@ int32_t nfs3svc_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -1; @@ -3346,7 +3350,7 @@ nfs3_remove_reply (rpcsvc_request_t *req, nfsstat3 stat, struct iatt *preparent int32_t nfs3svc_remove_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -3512,7 +3516,7 @@ nfs3_rmdir_reply (rpcsvc_request_t *req, nfsstat3 stat, struct iatt *preparent, int32_t nfs3svc_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -3664,7 +3668,8 @@ int32_t nfs3svc_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, - struct iatt *prenewparent, struct iatt *postnewparent) + struct iatt *prenewparent, struct iatt *postnewparent, + dict_t *xdata) { int ret = -EFAULT; nfsstat3 stat = NFS3ERR_SERVERFAULT; @@ -3870,7 +3875,7 @@ int32_t nfs3svc_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, struct iatt *buf, struct iatt *preparent, - struct iatt *postparent) + struct iatt *postparent, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -4079,7 +4084,8 @@ nfs3_readdir_reply (rpcsvc_request_t *req, nfsstat3 stat, struct nfs3_fh *dirfh, int32_t nfs3svc_readdir_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int is_eof = 0; @@ -4132,7 +4138,8 @@ nfs3err: int32_t nfs3svc_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, gf_dirent_t *entries) + int32_t op_ret, int32_t op_errno, gf_dirent_t *entries, + dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; int ret = -EFAULT; @@ -4439,7 +4446,8 @@ nfs3_fsstat_reply (rpcsvc_request_t *req, nfsstat3 stat, struct statvfs *fsbuf, int32_t nfs3_fsstat_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -4463,7 +4471,8 @@ nfs3_fsstat_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t nfs3_fsstat_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct statvfs *buf) + int32_t op_ret, int32_t op_errno, struct statvfs *buf, + dict_t *xdata) { nfs_user_t nfu = {0, }; int ret = -EFAULT; @@ -4623,7 +4632,8 @@ nfs3_fsinfo_reply (rpcsvc_request_t *req, nfsstat3 status, struct iatt *fsroot) int32_t nfs3svc_fsinfo_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { nfsstat3 status = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; @@ -4764,7 +4774,8 @@ nfs3_pathconf_reply (rpcsvc_request_t *req, nfsstat3 stat, struct iatt *buf) int32_t nfs3svc_pathconf_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct iatt *buf) + int32_t op_ret, int32_t op_errno, struct iatt *buf, + dict_t *xdata) { struct iatt *sbuf = NULL; nfs3_call_state_t *cs = NULL; @@ -4908,7 +4919,7 @@ nfs3_commit_reply (rpcsvc_request_t *req, nfsstat3 stat, uint64_t wverf, int32_t nfs3svc_commit_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno) + int32_t op_ret, int32_t op_errno, dict_t *xdata) { nfsstat3 stat = NFS3ERR_SERVERFAULT; nfs3_call_state_t *cs = NULL; diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index 16507d06..0aa1fc14 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -448,7 +448,7 @@ typedef int (*nlm4_resume_fn_t) (void *cs); int32_t nlm4_file_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, fd_t *fd) + int32_t op_ret, int32_t op_errno, fd_t *fd, dict_t *xdata) { nfs3_call_state_t *cs = frame->local; @@ -574,9 +574,9 @@ nlm4_file_open_and_resume(nfs3_call_state_t *cs, nlm4_resume_fn_t resume) frame->root->uid = 0; frame->root->gid = 0; frame->local = cs; - STACK_WIND_COOKIE(frame, nlm4_file_open_cbk, cs->nfsx, cs->nfsx, + STACK_WIND_COOKIE (frame, nlm4_file_open_cbk, cs->nfsx, cs->nfsx, cs->nfsx->fops->open, &cs->resolvedloc, O_RDWR, - cs->fd, GF_OPEN_NOWB); + cs->fd, NULL); ret = 0; err: return ret; @@ -677,7 +677,8 @@ nlm4_test_reply (nfs3_call_state_t *cs, nlm4_stats stat, struct gf_flock *flock) int nlm4svc_test_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct gf_flock *flock) + int32_t op_ret, int32_t op_errno, struct gf_flock *flock, + dict_t *xdata) { nlm4_stats stat = nlm4_denied; nfs3_call_state_t *cs = NULL; @@ -1210,7 +1211,8 @@ ret: int nlm4svc_lock_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct gf_flock *flock) + int32_t op_ret, int32_t op_errno, struct gf_flock *flock, + dict_t *xdata) { nlm4_stats stat = nlm4_denied; nfs3_call_state_t *cs = NULL; @@ -1378,7 +1380,8 @@ rpcerr: int nlm4svc_cancel_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct gf_flock *flock) + int32_t op_ret, int32_t op_errno, struct gf_flock *flock, + dict_t *xdata) { nlm4_stats stat = nlm4_denied; nfs3_call_state_t *cs = NULL; @@ -1434,7 +1437,8 @@ nlm4err: int nlm4svc_unlock_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct gf_flock *flock) + int32_t op_ret, int32_t op_errno, struct gf_flock *flock, + dict_t *xdata) { nlm4_stats stat = nlm4_denied; nfs3_call_state_t *cs = NULL; -- cgit