Messages in this thread Patch in this message | | | Subject | Re: [PATCH] ide barrier support, #2 | From | Andi Kleen <> | Date | Tue, 14 Oct 2003 14:53:47 +0200 |
| |
Jens Axboe <axboe@suse.de> writes:
This adds support for XFS for log writes (not for fsync). Based on the 2.4 XFS patch for write barriers I did some time ago.
It just does a flush, not a barrier. I think that's enough for log writes because XFS waits until the log write has hit disk.
It doesn't do anything special when the flush fails - just shuts down the file system as usual.
diff -u linux/fs/xfs/pagebuf/page_buf.c-o linux-2.6.0test6-work/fs/xfs/pagebuf/page_buf.c --- linux/fs/xfs/pagebuf/page_buf.c-o 2003-09-28 10:52:55.000000000 +0200 +++ linux/fs/xfs/pagebuf/page_buf.c 2003-10-14 14:48:44.000000000 +0200 @@ -1403,12 +1403,12 @@ submit_io: if (likely(bio->bi_size)) { - if (pb->pb_flags & PBF_READ) { - submit_bio(READ, bio); - } else { - submit_bio(WRITE, bio); - } - + int cmd = WRITE; + if (pb->pb_flags & PBF_READ) + cmd = READ; + else if (pb->pb_flags & PBF_FLUSH) + cmd = WRITESYNC; + submit_bio(cmd, bio); if (size) goto next_chunk; } else { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |