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:
Kirk McKusick 2002-11-20 05:14:16 +00:00
parent a5a82fa863
commit 3374bb5ad6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107095

View file

@ -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");