summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2019-06-20 17:05:49 +0530
committerPranith Kumar K <pkarampu@redhat.com>2019-10-30 13:48:18 +0530
commiteaabd1ee6be50b8f40b67b0e1ff28dd9fc802546 (patch)
treea1d19c9701694e1107e3f39647f859d95a4b9109 /xlators/protocol
parent84487199afeb486c5836f8f4396e90884e501311 (diff)
cluster/ec: Prevent double pre-op xattrops
Problem: Race: Thread-1 Thread-2 1) Does ec_get_size_version() to perform pre-op fxattrop as part of write-1 2) Calls ec_set_dirty_flag() in ec_get_size_version() for write-2. This sets dirty[] to 1 3) Completes executing ec_prepare_update_cbk leading to ctx->dirty[] = '1' 4) Takes LOCK(inode->lock) to check if there are any flags and sets dirty-flag because lock->waiting_flag is 0 now. This leads to fxattrop to increment on-disk dirty[] to '2' At the end of the writes the file will be marked for heal even when it doesn't need heal. Fix: Perform ec_set_dirty_flag() and other checks inside LOCK() to prevent dirty[] to be marked as '1' in step 2) above Updates bz#1739446 Change-Id: Icac2ab39c0b1e7e154387800fbededc561612865 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'xlators/protocol')
0 files changed, 0 insertions, 0 deletions