[Bugs] [Bug 1487504] files are appendable on file-based worm volume

bugzilla at redhat.com bugzilla at redhat.com
Thu Sep 28 10:20:37 UTC 2017


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



--- Comment #5 from Karthik U S <ksubrahm at redhat.com> ---
Hi Jurgen Reij,

Current code does not have the state transition mechanism in the write code
path. This is a bug and we have a dependency on some other thing for this. Once
that is fixed we will do transition in the write path as well, so the next
writes will be blocked.
Let me try to explain the scenario in your test. First you created the
testfile. After 13 seconds you are trying to do append write, and expect it to
be blocked since the auto-commit-period is 10secs. Since it is an append write,
and not link, unlink, rename, or truncate (the only 4 fops which does the state
transition in the current code), it won't check for the state transition  and
does the next write. So the content gets updated.
Instead of checking only the date, check the stat of the file. The atime will
point to a future value after state transition to worm-retained state which
will then be equal to the "time at which transition happened + the retention
period". In normal state it will allow append write.

We will fix the behaviour so write fops will also do the state transition.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=nDVPnlbW0m&a=cc_unsubscribe


More information about the Bugs mailing list