If an error occurs while writing a buffer, then the data will
not have hit the disk and the dependencies cannot be unrolled. In this case, the system will mark the buffer as dirty again so that the write can be retried in the future. When the write succeeds or the system gives up on the buffer and marks it as invalid (B_INVAL), the dependencies will be cleared. Sponsored by: DARPA & NAI Labs.
This commit is contained in:
parent
13580e5c68
commit
637af64f54
@ -3935,6 +3935,12 @@ softdep_disk_write_complete(bp)
|
||||
struct inodedep *inodedep;
|
||||
struct bmsafemap *bmsafemap;
|
||||
|
||||
/*
|
||||
* If an error occurred while doing the write, then the data
|
||||
* has not hit the disk and the dependencies cannot be unrolled.
|
||||
*/
|
||||
if ((bp->b_ioflags & BIO_ERROR) != 0 && (bp->b_flags & B_INVAL) == 0)
|
||||
return;
|
||||
#ifdef DEBUG
|
||||
if (lk.lkt_held != NOHOLDER)
|
||||
panic("softdep_disk_write_complete: lock is held");
|
||||
|
Loading…
x
Reference in New Issue
Block a user