#1271 closed defect (fixed)
[libblock, bdbuf] xfer-in-progress flag not reset if ioctl() fails
Reported by: | strauman | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 4.7 |
Component: | lib/block | Version: | 4.7 |
Severity: | normal | Keywords: | |
Cc: | chrisj@…, victor.vengerov@… | Blocked By: | |
Blocking: |
Description
When casting out buffers, the swapout task
sets the buffer's 'in_progress' flag and clears 'modified'.
If the ioctl() command for scheduling the write operation
fails, any tasks waiting on the buffer are woken up but
the 'in_progress' flag remains set so that anybody
looping in find_or_assign_buffer() goes back to sleep.
In the normal case (ioctl successful) the ISR resets 'in_progress'
and wakes up the tasks waiting for the buffer.
FIX: if ioctl fails, in_progress must be reset to FALSE (and 'modified'
should be set to TRUE since the dirty buffer was not written).
Attachments (1)
Change History (3)
Changed on 01/06/08 at 04:45:51 by strauman
Attachment: | bdbuf.c-swapout_ioctl_fail.diff added |
---|
comment:1 Changed on 08/06/08 at 03:28:35 by Chris Johns
Cc: | Chris Johns added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In the new bdbuf code if the writes fails the buffers are placed back onto the queue and the transfer tries again.
I do not think this is optimal but ignoring the error is also not great.
Suggestions for a solution are welcome.
The specific issue in the bug has been fixed. The state of the buffer is correctly handled in the new code.
comment:2 Changed on 10/10/17 at 06:49:19 by Sebastian Huber
Component: | score → lib/block |
---|
fix for the reported bug