linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: majianpeng <majianpeng@gmail.com>
To: "Neil Brown" <neilb@suse.de>
Cc: viro <viro@ZenIV.linux.org.uk>,
	linux-raid <linux-raid@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Re: [PATCH 2/2] raid5: For write performance, remove REQ_SYNC when write was odirect.
Date: Mon, 16 Jul 2012 15:11:29 +0800	[thread overview]
Message-ID: <201207161511247039289@gmail.com> (raw)
In-Reply-To: 20120716170717.5d5ee04c@notabene.brown

On 2012-07-16 15:07 NeilBrown <neilb@suse.de> Wrote:
>On Mon, 16 Jul 2012 14:42:54 +0800 majianpeng <majianpeng@gmail.com> wrote:
>
>> On 2012-07-16 13:40 NeilBrown <neilb@suse.de> Wrote:
>> >On Mon, 16 Jul 2012 09:31:55 +0800 majianpeng <majianpeng@gmail.com> wrote:
>> >
[snip]
>> > Normal 'sync' requests use WRITE_SYNC which includes "REQ_NOIDLE" which means
>> >   /* don't anticipate more IO after this one */
>> > O_DIRECT request use WRITE_ODIRECT which does not include this flag.
>> >
>
>> Using REQ_NOIDEL to difference odirect and sync.Why not using:
>>  +	if (bi->bi_rw & WRITE_ODIRECT)
>>  +		bi->bi_rw &= ~REQ_SYNC;
>
>Because that code is wrong.  WRITE_ODIRECT is not one flag, it is two flags
>'or'ed together.  So this code does not do what you expect.
>
No, I used those code test and it's ok.
The code used & not &&.
Maybe I wrong?
>
>> 
[snip]

  reply	other threads:[~2012-07-16  7:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16  1:31 [PATCH 2/2] raid5: For write performance, remove REQ_SYNC when write was odirect majianpeng
2012-07-16  5:40 ` NeilBrown
2012-07-16  5:47   ` majianpeng
2012-07-16  6:42   ` majianpeng
2012-07-16  7:07     ` NeilBrown
2012-07-16  7:11       ` majianpeng [this message]
2012-07-16  7:30         ` NeilBrown
2012-07-16  8:14           ` majianpeng

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=201207161511247039289@gmail.com \
    --to=majianpeng@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).