On 2012-08-01 06:56 akpm <[email protected]> Wrote:
>
>The patch titled
> Subject: fs/direct-io.c: set bi_rw when allocating bio
>has been added to the -mm tree. Its filename is
> fs-direct-ioc-set-bi_rw-when-alloc-bio.patch
>
>Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
>*** Remember to use Documentation/SubmitChecklist when testing your code ***
>
>The -mm tree is included into linux-next and is updated
>there every 3-4 working days
>
>------------------------------------------------------
>From: majianpeng <[email protected]>
>Subject: fs/direct-io.c: set bi_rw when allocating bio
>
>When calling bio_alloc(), the bi_rw is zero. But after calling bio_add_page()
>it will use bi_rw.
>
>Fox example, in __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; /* always allow writes to be mergeable */
>
>This bug is causing raid5 performance issues.
>
>Signed-off-by: Jianpeng Ma <[email protected]>
>Reviewed-by: Jeff Moyer <[email protected]>
>Cc: Neil Brown <[email protected]>
>Cc: Al Viro <[email protected]>
>Cc: <[email protected]>
>Signed-off-by: Andrew Morton <[email protected]>
>---
>
> fs/direct-io.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff -puN fs/direct-io.c~fs-direct-ioc-set-bi_rw-when-alloc-bio fs/direct-io.c
>--- a/fs/direct-io.c~fs-direct-ioc-set-bi_rw-when-alloc-bio
>+++ a/fs/direct-io.c
>@@ -349,6 +349,7 @@ dio_bio_alloc(struct dio *dio, struct di
>
> bio->bi_bdev = bdev;
> bio->bi_sector = first_sector;
>+ bio->bi_rw = dio->rw;
> if (dio->is_async)
> bio->bi_end_io = dio_bio_end_aio;
> else
>_
>
>Patches currently in -mm which might be from [email protected] are
>
>origin.patch
>linux-next.patch
>fs-direct-ioc-set-bi_rw-when-alloc-bio.patch
>
Thanks for your time, I will pay attention to.