diff options
| author | Pranith Kumar K <pkarampu@redhat.com> | 2019-06-20 17:05:49 +0530 |
|---|---|---|
| committer | hari gowtham <hari.gowtham005@gmail.com> | 2020-02-24 07:55:55 +0000 |
| commit | ab30da4ff9d26935fa157b2732b9f3c36dd2519e (patch) | |
| tree | 01bbcce5adf759b7c64b3dff1b8b461eb60a39f4 /run-tests.sh | |
| parent | d6584baa65c73577b29b99f47ac9820b3b8b3b00 (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
Fixes: bz#1805050
Change-Id: Icac2ab39c0b1e7e154387800fbededc561612865
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'run-tests.sh')
0 files changed, 0 insertions, 0 deletions
