+ fs-direct-ioc-set-bi_rw-when-alloc-bio.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <majianpeng@xxxxxxxxx>
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 */

Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
Cc: Neil Brown <neilb@xxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 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 majianpeng@xxxxxxxxx are

origin.patch
linux-next.patch
fs-direct-ioc-set-bi_rw-when-alloc-bio.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux