Thread (11 messages) 11 messages, 5 authors, 2013-02-04

Re: fsync() on read-only RAID triggers BUG

From: Sebastian Riemer <hidden>
Date: 2013-01-25 15:09:15

On 20.01.2013 19:44, Ben Hutchings wrote:
quoted hunk ↗ jump to hunk
# Call fsync()
python -c "import os; os.fsync(os.open('/dev/md0', os.O_RDWR))"
--- END ---
I assume that the sync request should be filtered out at some point
before this assertion is made, since there can be nothing to sync.
I wrote a test case in C. It gets SIGSEGV upon fsync. When making the
rdevs below also read-only the MD device can't be stopped anymore as it
thinks that there is still active IO.

The attached patch should fix it. Please confirm. We have to return a
completion without incrementing the active IO count. Error code -EROFS
seems to be suited best.

But the libc fsync gets -EIO anyway:
Input/output error

Any objection?

Cheers,
Sebastian

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help