diff options
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 44 | ||||
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 58 | ||||
-rw-r--r-- | xlators/performance/quick-read/src/quick-read.c | 49 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 38 | ||||
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.c | 66 | ||||
-rw-r--r-- | xlators/performance/symlink-cache/src/symlink-cache.c | 8 | ||||
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 26 |
7 files changed, 194 insertions, 95 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index db1e204fd4f..53c7b1f10bd 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -163,7 +163,7 @@ ioc_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t ioc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *stbuf, dict_t *dict) + struct stat *stbuf, dict_t *dict, struct stat *postparent) { ioc_inode_t *ioc_inode = NULL; ioc_local_t *local = frame->local; @@ -745,7 +745,8 @@ ioc_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t ioc_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 stat *buf) + inode_t *inode, struct stat *buf, struct stat *preparent, + struct stat *postparent) { ioc_local_t *local = NULL; ioc_table_t *table = NULL; @@ -811,7 +812,7 @@ ioc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, */ int32_t ioc_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, - fd_t *fd) + fd_t *fd, int32_t wbflags) { ioc_local_t *local = NULL; @@ -830,7 +831,7 @@ ioc_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, frame->local = local; STACK_WIND (frame, ioc_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, loc, flags, fd); + FIRST_CHILD(this)->fops->open, loc, flags, fd, wbflags); return 0; } @@ -1160,7 +1161,8 @@ ioc_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, */ int32_t ioc_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *stbuf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { ioc_local_t *local = NULL; uint64_t ioc_inode = 0; @@ -1171,7 +1173,7 @@ ioc_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (ioc_inode) ioc_inode_flush ((ioc_inode_t *)(long)ioc_inode); - STACK_UNWIND (frame, op_ret, op_errno, stbuf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1230,13 +1232,37 @@ ioc_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, */ int32_t ioc_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } + +/* + * ioc_ftruncate_cbk - + * + * @frame: + * @cookie: + * @this: + * @op_ret: + * @op_errno: + * @buf: + * + */ +int32_t +ioc_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) +{ + + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + return 0; +} + + /* * ioc_truncate - * @@ -1278,7 +1304,7 @@ ioc_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset) if (ioc_inode) ioc_inode_flush ((ioc_inode_t *)(long)ioc_inode); - STACK_WIND (frame, ioc_truncate_cbk, FIRST_CHILD(this), + STACK_WIND (frame, ioc_ftruncate_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->ftruncate, fd, offset); return 0; } diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index dc4b556162c..3a7504f3275 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -316,7 +316,8 @@ out: int iot_lookup_cbk (call_frame_t *frame, void * cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, - inode_t *inode, struct stat *buf, dict_t *xattr) + inode_t *inode, struct stat *buf, dict_t *xattr, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, buf, xattr); return 0; @@ -516,7 +517,8 @@ out: int iot_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, const char *path) + int32_t op_ret, int32_t op_errno, const char *path, + struct stat *sbuf) { STACK_UNWIND (frame, op_ret, op_errno, path); return 0; @@ -568,7 +570,8 @@ out: int iot_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, buf); return 0; @@ -618,7 +621,8 @@ out: int iot_mkdir_cbk (call_frame_t *frame, void * cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, buf); return 0; @@ -665,7 +669,8 @@ out: int iot_rmdir_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, struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno); return 0; @@ -712,7 +717,8 @@ out: int iot_symlink_cbk (call_frame_t *frame, void * cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, buf); return 0; @@ -762,7 +768,9 @@ out: int iot_rename_cbk (call_frame_t *frame, void * cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *buf, + struct stat *preoldparent, struct stat *postoldparent, + struct stat *prenewparent, struct stat *postnewparent) { STACK_UNWIND (frame, op_ret, op_errno, buf); return 0; @@ -820,22 +828,22 @@ iot_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int iot_open_wrapper (call_frame_t * frame, xlator_t * this, loc_t *loc, - int32_t flags, fd_t * fd) + int32_t flags, fd_t * fd, int32_t wbflags) { STACK_WIND (frame, iot_open_cbk, FIRST_CHILD (this), - FIRST_CHILD (this)->fops->open, loc, flags, fd); + FIRST_CHILD (this)->fops->open, loc, flags, fd, wbflags); return 0; } int iot_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, - fd_t *fd) + fd_t *fd, int32_t wbflags) { call_stub_t *stub = NULL; int ret = -1; - stub = fop_open_stub (frame, iot_open_wrapper, loc, flags, fd); + stub = fop_open_stub (frame, iot_open_wrapper, loc, flags, fd, wbflags); if (!stub) { gf_log (this->name, GF_LOG_ERROR, "cannot create open call stub" @@ -863,7 +871,8 @@ out: int iot_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 stat *stbuf) + struct stat *stbuf, struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, fd, inode, stbuf); return 0; @@ -1020,9 +1029,10 @@ out: int iot_fsync_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, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1071,9 +1081,10 @@ out: int iot_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *stbuf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, stbuf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1288,9 +1299,10 @@ out: int iot_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1349,9 +1361,10 @@ out: int iot_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1450,7 +1463,8 @@ out: int iot_unlink_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, struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno); return 0; @@ -1503,7 +1517,7 @@ out: int iot_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, struct stat *preparent, struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, buf); return 0; diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index 1249da87b20..3e732e51a0a 100644 --- a/xlators/performance/quick-read/src/quick-read.c +++ b/xlators/performance/quick-read/src/quick-read.c @@ -149,7 +149,7 @@ out: int32_t qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf, dict_t *dict) + struct stat *buf, dict_t *dict, struct stat *postparent) { data_t *content = NULL; qr_file_t *qr_file = NULL; @@ -415,7 +415,7 @@ out: int32_t qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, - fd_t *fd) + fd_t *fd, int32_t wbflags) { qr_file_t *qr_file = NULL; int32_t ret = -1; @@ -516,7 +516,7 @@ unwind: wind: STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, loc, flags, fd); + FIRST_CHILD(this)->fops->open, loc, flags, fd, wbflags); return 0; } @@ -709,7 +709,7 @@ qr_validate_cache (call_frame_t *frame, xlator_t *this, fd_t *fd, STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, - &loc, flags, fd); + &loc, flags, fd, 0); qr_loc_wipe (&loc); } else if (can_wind) { @@ -949,7 +949,7 @@ out: STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, - &loc, flags, fd); + &loc, flags, fd, 0); qr_loc_wipe (&loc); } else if (can_wind) { @@ -974,10 +974,11 @@ out: int32_t -qr_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno, struct stat *stbuf) +qr_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, stbuf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1081,7 +1082,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -1174,7 +1175,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -1274,7 +1275,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -1372,7 +1373,7 @@ out: STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, &loc, open_flags, - fd); + fd, 0); qr_loc_wipe (&loc); } @@ -1472,7 +1473,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -1644,7 +1645,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -1743,7 +1744,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -1754,9 +1755,9 @@ out: int32_t qr_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno) + int32_t op_errno, struct stat *prebuf, struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1836,7 +1837,7 @@ out: STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, &loc, open_flags, - fd); + fd, 0); qr_loc_wipe (&loc); } @@ -1847,7 +1848,8 @@ out: int32_t qr_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { int32_t ret = 0; uint64_t value = 0; @@ -1873,7 +1875,8 @@ qr_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (qr_file) { LOCK (&qr_file->lock); { - if (qr_file->stbuf.st_size != buf->st_size) { + if (qr_file->stbuf.st_size != postbuf->st_size) + { dict_unref (qr_file->xattr); qr_file->xattr = NULL; } @@ -1883,7 +1886,7 @@ qr_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } out: - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1977,7 +1980,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } @@ -2073,7 +2076,7 @@ out: } STACK_WIND (frame, qr_open_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, &loc, flags, fd); + FIRST_CHILD(this)->fops->open, &loc, flags, fd, 0); qr_loc_wipe (&loc); } diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index 6d1c5a2bcfa..a6b6f2f254b 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -112,7 +112,8 @@ unwind: int ra_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 stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { ra_conf_t *conf = NULL; ra_file_t *file = NULL; @@ -177,12 +178,12 @@ unwind: int ra_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, - fd_t *fd) + fd_t *fd, int32_t wbflags) { STACK_WIND (frame, ra_open_cbk, FIRST_CHILD (this), FIRST_CHILD (this)->fops->open, - loc, flags, fd); + loc, flags, fd, wbflags); return 0; } @@ -525,6 +526,16 @@ ra_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, } + +int +ra_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, + int32_t op_errno, struct stat *prebuf, struct stat *postbuf) +{ + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + return 0; +} + + int ra_flush (call_frame_t *frame, xlator_t *this, fd_t *fd) { @@ -577,7 +588,7 @@ ra_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync) flush_region (frame, file, 0, file->pages.prev->offset+1); } - STACK_WIND (frame, ra_flush_cbk, + STACK_WIND (frame, ra_fsync_cbk, FIRST_CHILD (this), FIRST_CHILD (this)->fops->fsync, fd, datasync); @@ -591,7 +602,8 @@ unwind: int ra_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *stbuf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { fd_t *fd = NULL; ra_file_t *file = NULL; @@ -606,7 +618,7 @@ ra_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, flush_region (frame, file, 0, file->pages.prev->offset+1); frame->local = NULL; - STACK_UNWIND (frame, op_ret, op_errno, stbuf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -650,6 +662,16 @@ unwind: int +ra_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) +{ + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + return 0; +} + + +int ra_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, struct stat *buf) { @@ -683,7 +705,7 @@ ra_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset) } UNLOCK (&inode->lock); - STACK_WIND (frame, ra_attr_cbk, + STACK_WIND (frame, ra_truncate_cbk, FIRST_CHILD (this), FIRST_CHILD (this)->fops->truncate, loc, offset); @@ -748,7 +770,7 @@ ra_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset) } UNLOCK (&inode->lock); - STACK_WIND (frame, ra_attr_cbk, + STACK_WIND (frame, ra_truncate_cbk, FIRST_CHILD (this), FIRST_CHILD (this)->fops->ftruncate, fd, offset); diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index 67a61fc47e7..e2771314a7a 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -362,7 +362,7 @@ unlock: int32_t sp_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf, dict_t *dict) + struct stat *buf, dict_t *dict, struct stat *postparent) { struct stat *stbuf = NULL; int32_t ret = -1; @@ -401,7 +401,7 @@ out: int32_t sp_lookup_behind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf, dict_t *dict) + struct stat *buf, dict_t *dict, struct stat *postparent) { sp_local_t *local = NULL; sp_cache_t *cache = NULL; @@ -672,10 +672,24 @@ unwind: int32_t -sp_stbuf_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno, struct stat *buf) +sp_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - SP_STACK_UNWIND (frame, op_ret, op_errno, buf); + SP_STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); + return 0; +} + + + +int32_t +sp_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct stat *buf, + struct stat *preoldparent, struct stat *postoldparent, + struct stat *prenewparent, struct stat *postnewparent) +{ + SP_STACK_UNWIND (frame, op_ret, op_errno, buf, preoldparent, + postoldparent, prenewparent, postnewparent); return 0; } @@ -712,7 +726,7 @@ out: int32_t sp_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, - fd_t *fd) + fd_t *fd, int wbflags) { sp_local_t *local = NULL; int32_t ret = -1; @@ -728,7 +742,7 @@ sp_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, } STACK_WIND (frame, sp_fd_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->open, loc, flags, fd); + FIRST_CHILD(this)->fops->open, loc, flags, fd, wbflags); return 0; unwind: @@ -740,7 +754,8 @@ unwind: static int32_t sp_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 stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { sp_local_t *local = NULL; sp_fd_ctx_t *fd_ctx = NULL; @@ -837,9 +852,11 @@ unwind: int32_t sp_new_entry_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { - STACK_UNWIND (frame, op_ret, op_errno, inode, buf); + STACK_UNWIND (frame, op_ret, op_errno, inode, buf, preparent, + postparent); return 0; } @@ -972,7 +989,7 @@ sp_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset) sp_cache_remove_entry (cache, (char *)loc->name, 0); } - STACK_WIND (frame, sp_stbuf_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_truncate_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->truncate, loc, offset); return 0; @@ -1007,7 +1024,7 @@ sp_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset) sp_cache_remove_entry (cache, name, 0); } - STACK_WIND (frame, sp_stbuf_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_truncate_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->ftruncate, fd, offset); return 0; @@ -1054,9 +1071,10 @@ unwind: int32_t sp_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, const char *path) + int32_t op_ret, int32_t op_errno, const char *path, + struct stat *buf) { - SP_STACK_UNWIND (frame, op_ret, op_errno, path); + SP_STACK_UNWIND (frame, op_ret, op_errno, path, buf); return 0; } @@ -1084,6 +1102,16 @@ unwind: return 0; } +int32_t +sp_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, + int32_t op_ret, int32_t op_errno, struct stat *preparent, + struct stat *postparent) +{ + SP_STACK_UNWIND (frame, op_ret, op_errno, preparent, postparent); + return 0; +} + + int32_t sp_err_cbk (call_frame_t *frame, void *cookie, xlator_t *this, @@ -1115,7 +1143,7 @@ sp_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc) goto unwind; } - STACK_WIND (frame, sp_err_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_unlink_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->unlink, loc); return 0; @@ -1169,7 +1197,7 @@ sp_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) goto unwind; } - STACK_WIND (frame, sp_err_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_unlink_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->rmdir, loc); return 0; @@ -1251,7 +1279,7 @@ sp_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, sp_cache_remove_entry (cache, name, 0); } - STACK_WIND (frame, sp_stbuf_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_unlink_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->writev, fd, vector, count, off, iobref); return 0; @@ -1287,7 +1315,7 @@ sp_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags) sp_cache_remove_entry (cache, name, 0); } - STACK_WIND (frame, sp_err_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_unlink_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->fsync, fd, flags); return 0; @@ -1338,7 +1366,7 @@ sp_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,loc_t *newloc) sp_remove_caches_from_all_fds_opened (this, oldloc->inode); } - STACK_WIND (frame, sp_stbuf_cbk, FIRST_CHILD(this), + STACK_WIND (frame, sp_rename_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->rename, oldloc, newloc); return 0; diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c index ad0836c5eb2..791fde3c509 100644 --- a/xlators/performance/symlink-cache/src/symlink-cache.c +++ b/xlators/performance/symlink-cache/src/symlink-cache.c @@ -242,7 +242,7 @@ sc_cache_get (xlator_t *this, inode_t *inode, char **link) int sc_readlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, - const char *link) + const char *link, struct stat *sbuf) { if (op_ret > 0) sc_cache_update (this, frame->local, link); @@ -287,7 +287,8 @@ sc_readlink (call_frame_t *frame, xlator_t *this, int sc_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, - inode_t *inode, struct stat *buf) + inode_t *inode, struct stat *buf, struct stat *preparent, + struct stat *postparent) { if (op_ret == 0) { if (frame->local) { @@ -318,7 +319,8 @@ sc_symlink (call_frame_t *frame, xlator_t *this, int sc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, - inode_t *inode, struct stat *buf, dict_t *xattr) + inode_t *inode, struct stat *buf, dict_t *xattr, + struct stat *postparent) { if (op_ret == 0) sc_cache_validate (this, inode, buf); diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 300d684659e..57311f6d498 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -310,7 +310,7 @@ wb_file_destroy (wb_file_t *file) int32_t wb_sync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno, struct stat *stbuf) + int32_t op_errno, struct stat *prebuf, struct stat *postbuf) { wb_local_t *local = NULL; list_head_t *winds = NULL; @@ -774,7 +774,8 @@ wb_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd) int32_t wb_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { wb_local_t *local = NULL; wb_request_t *request = NULL; @@ -795,7 +796,7 @@ wb_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); if (request) { wb_request_unref (request); @@ -916,7 +917,8 @@ wb_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset) int32_t wb_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *buf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { wb_local_t *local = NULL; wb_request_t *request = NULL; @@ -936,7 +938,7 @@ wb_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -1211,7 +1213,7 @@ wb_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, int32_t wb_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, - fd_t *fd) + fd_t *fd, int32_t wbflags) { frame->local = (void *)(long)flags; @@ -1219,7 +1221,7 @@ wb_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, wb_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, - loc, flags, fd); + loc, flags, fd, wbflags); return 0; } @@ -1227,7 +1229,8 @@ wb_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, int32_t wb_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 stat *buf) + struct stat *buf, struct stat *preparent, + struct stat *postparent) { long flags = 0; wb_file_t *file = NULL; @@ -1702,9 +1705,10 @@ out: int32_t wb_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this, - int32_t op_ret, int32_t op_errno, struct stat *stbuf) + int32_t op_ret, int32_t op_errno, struct stat *prebuf, + struct stat *postbuf) { - STACK_UNWIND (frame, op_ret, op_errno, stbuf); + STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); return 0; } @@ -2124,7 +2128,7 @@ wb_flush (call_frame_t *frame, xlator_t *this, fd_t *fd) static int32_t wb_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno) + int32_t op_errno, struct stat *prebuf, struct stat *postbuf) { wb_local_t *local = NULL; wb_file_t *file = NULL; |