diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-11-20 05:14:16 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-11-20 05:14:16 +0000 |
commit | 637af64f544f6afdc6bfad85d6fb1706fd0907af (patch) | |
tree | 8325a4c034f34422b65c31858fa58a00c76e4130 /sys | |
parent | 13580e5c6846707466e0d71c5139f8a0f6e61926 (diff) | |
download | FreeBSD-src-637af64f544f6afdc6bfad85d6fb1706fd0907af.zip FreeBSD-src-637af64f544f6afdc6bfad85d6fb1706fd0907af.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 422cabc..5a185e5 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -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"); |