public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ide barrier support, #2
Date: Tue, 14 Oct 2003 14:53:47 +0200	[thread overview]
Message-ID: <m3zng4ou90.fsf@averell.firstfloor.org> (raw)
In-Reply-To: <GurO.7cg.43@gated-at.bofh.it> (Jens Axboe's message of "Tue, 14 Oct 2003 12:20:20 +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 {

       reply	other threads:[~2003-10-14 12:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <GurO.7cg.43@gated-at.bofh.it>
2003-10-14 12:53 ` Andi Kleen [this message]
2003-10-14 12:57   ` [PATCH] ide barrier support, #2 Jens Axboe
2003-10-14 15:08     ` Andi Kleen
2003-10-14 15:12       ` Jens Axboe
2003-10-14 15:28         ` Andi Kleen
2003-10-14 15:31           ` Jens Axboe
2003-10-14 10:15 Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zng4ou90.fsf@averell.firstfloor.org \
    --to=ak@muc.de \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox