On 2012-07-16 15:07 NeilBrown <neilb@xxxxxxx> Wrote:
>On Mon, 16 Jul 2012 14:42:54 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote:
>
>> On 2012-07-16 13:40 NeilBrown <neilb@xxxxxxx> Wrote:
>> >On Mon, 16 Jul 2012 09:31:55 +0800 majianpeng <majianpeng@xxxxxxxxx> 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]?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f
[ATA RAID]
[Linux SCSI Target Infrastructure]
[Managing RAID on Linux]
[Linux IDE]
[Linux SCSI]
[Linux Hams]
[Device-Mapper]
[Kernel]
[Linux Books]
[Linux Admin]
[Linux Net]
[GFS]
[RPM]
[git]
[Photos]
[Yosemite Photos]
[Yosemite News]
[AMD 64]
[Linux Networking]