Re: [RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-30 Thread Jeff Moyer
majianpeng writes: > On 2012-07-27 22:21 Jeff Moyer Wrote: >>majianpeng writes: >> >>> When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, >>> it will use bi_rw. >>> Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). >>> The merge_bvec_fn of raid456 will

Re: [RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-30 Thread Jeff Moyer
majianpeng majianp...@gmail.com writes: On 2012-07-27 22:21 Jeff Moyer jmo...@redhat.com Wrote: majianpeng majianp...@gmail.com writes: When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, it will use bi_rw. Fox example, in functiion __bio_add_page,it will call

Re: Re: [RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-29 Thread majianpeng
On 2012-07-27 22:21 Jeff Moyer Wrote: >majianpeng writes: > >> When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, >> it will use bi_rw. >> Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). >> The merge_bvec_fn of raid456 will use the bi_rw to judge the

Re: Re: [RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-29 Thread majianpeng
On 2012-07-27 22:21 Jeff Moyer jmo...@redhat.com Wrote: majianpeng majianp...@gmail.com writes: When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, it will use bi_rw. Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). The merge_bvec_fn of raid456 will

Re: [RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-27 Thread Jeff Moyer
majianpeng writes: > When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, > it will use bi_rw. > Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). > The merge_bvec_fn of raid456 will use the bi_rw to judge the merge. >>> if ((bvm->bi_rw & 1) == WRITE) >>>

[RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-27 Thread majianpeng
When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, it will use bi_rw. Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). The merge_bvec_fn of raid456 will use the bi_rw to judge the merge. >> if ((bvm->bi_rw & 1) == WRITE) >> return

[RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-27 Thread majianpeng
When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, it will use bi_rw. Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). The merge_bvec_fn of raid456 will use the bi_rw to judge the merge. if ((bvm-bi_rw 1) == WRITE) return biovec-bv_len; /*

Re: [RFC PATCH] fs/direct-io.c: Set bi_rw when alloc bio.

2012-07-27 Thread Jeff Moyer
majianpeng majianp...@gmail.com writes: When exec bio_alloc, the bi_rw is zero.But after calling bio_add_page, it will use bi_rw. Fox example, in functiion __bio_add_page,it will call merge_bvec_fn(). The merge_bvec_fn of raid456 will use the bi_rw to judge the merge. if ((bvm-bi_rw 1) ==