[Bugs] [Bug 1593224] [Disperse] : Client side heal is not removing dirty flag for some of the files.

bugzilla at redhat.com bugzilla at redhat.com
Tue Dec 18 11:23:15 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1593224



--- Comment #4 from Ashish Pandey <aspandey at redhat.com> ---

I have found a bug which was the actual cause of dirty flag remain set even
after heal happened and all the version and size are matching.
This bug can only be visible when we have shd disabled as shd will clear the
dirty flag if it has nothing to heal. 

1 - Let's say we have disabled shd
2 - Create a file and then kill a brick
3 - Write data, around 1GB, on file which will be healed after bricks comes UP
4 - Bring the brick UP
5 - Do "chmod 0777 file" this will trigger heal.
6 - Immediately, start write on this file append 512 bytes using dd.

Now, while data healing was happening, write from mount came (step 6) and took
the lock. It saw that healing flag is set on version xattr of file so it will
send write on all the bricks. Before releasing lock it will also update version
and size on ALL the bricks including brick which is healing.

However, in ec_update_info, we consider lock->good_mask to decide if we should
unset the "dirty" flag or not which was set by this write fop,  even if it has
succeeded on all the bricks.

So, +1 of dirty flag will remain as it is by this write fop.

Now, data heal again got the lock and after completing data heal, we unset the
dirty flag by decreasing it by the _same_ number which we found at the start of
healing. This will not have the incremented value made by the write fop in step
6.

So, after healing a dirty flag will remain set on the file. This flag will
never be unset if shd is not enabled.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Bugs mailing list