public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ide barrier support, #2
Date: Tue, 14 Oct 2003 14:57:23 +0200	[thread overview]
Message-ID: <20031014125723.GR1107@suse.de> (raw)
In-Reply-To: <m3zng4ou90.fsf@averell.firstfloor.org>

On Tue, Oct 14 2003, Andi Kleen wrote:
> 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;

Uh be careful! It must be WRITEBARRIER, not WRITESYNC. I think I'll kill
WRITEBARRIER and just call it WRITESYNC, it's more logical. I've added
the modified variant, thanks.

-- 
Jens Axboe


  reply	other threads:[~2003-10-14 12:58 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 ` [PATCH] ide barrier support, #2 Andi Kleen
2003-10-14 12:57   ` Jens Axboe [this message]
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=20031014125723.GR1107@suse.de \
    --to=axboe@suse.de \
    --cc=ak@muc.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