From 492993570bb02bd7d244693ad28e409973fa9f4c Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 20 Oct 2009 03:43:43 +0000 Subject: performance/write-behind: fix to bug in setattr which was causing frames to be missed. - local->file was being assigned even before file pointer was got from any of the fds opened on the inode, thus making local->file to be NULL. In wb_setattr_cbk, since local->file is NULL (and hence file passed to wb_process_queue), wb_process_queue does not resume the pending operations queued for the file. Signed-off-by: Anand V. Avati BUG: 327 (dbench does not complete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=327 --- xlators/performance/write-behind/src/write-behind.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/performance/write-behind/src/write-behind.c') diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index b67e53c37..bdbc21c97 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -1134,7 +1134,6 @@ wb_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc, goto unwind; } - local->file = file; frame->local = local; @@ -1163,6 +1162,8 @@ wb_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc, } + local->file = file; + if (file) { stub = fop_setattr_stub (frame, wb_setattr_helper, loc, stbuf, valid); if (stub == NULL) { -- cgit