xfs
[Top] [All Lists]

[PATCH 2/8] drivers/block/xen-blkback:Evalue bio->bi_rw after calling bi

To: axboe <axboe@xxxxxxxxx>, "konrad.wilk" <konrad.wilk@xxxxxxxxxx>, "chris.mason" <chris.mason@xxxxxxxxxxxx>, viro <viro@xxxxxxxxxxxxxxxxxx>, tytso <tytso@xxxxxxx>, "adilger.kernel" <adilger.kernel@xxxxxxxxx>, shaggy <shaggy@xxxxxxxxxx>, mfasheh <mfasheh@xxxxxxxx>, jlbec <jlbec@xxxxxxxxxxxx>, bpm <bpm@xxxxxxx>, elder <elder@xxxxxxxxxx>
Subject: [PATCH 2/8] drivers/block/xen-blkback:Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page().
From: majianpeng <majianpeng@xxxxxxxxx>
Date: Mon, 30 Jul 2012 15:23:55 +0800
Cc: linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, linux-btrfs <linux-btrfs@xxxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, linux-ext4 <linux-ext4@xxxxxxxxxxxxxxx>, jfs-discussion <jfs-discussion@xxxxxxxxxxxxxxxxxxxxx>, xfs <xfs@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:x-priority:x-has-attach:x-mailer :mime-version:message-id:content-type:content-transfer-encoding; bh=OIYZuZcIdVj73PucxoypNuIZ0psxIU8AGs7oAAhh8V0=; b=cV2ALb8isFzYv0M9KFf95K+on9puHX3yqt0gkxNSuv1gz82PL/aIAbw+6DaJ6ZKaoO i/hucKov1Hxl//2HvjpJrhAROifMkihlW4e2rSk4EDjvknXWu17VcOHb1bDk9C5MMUoP 8SaS7vxzKE+HOkIiVBb8ViL4JSRBzAtEtHv+w6x1nL/DrQYYxZxjQCyW7CfgceEIMVMJ SWvdzyD2Ap5z+4+yYmQLepmEZMe+06OhY0dsY4AKdY+dhYI6mlLG6Cv4mpwbAeUbeJeF 2mhprvIUs4HxvKI7Fm9/JV8A2EKTtgungmoQcrmdqQT0Z1+Rnj1Wm+KtRDxHYvO1+NIJ Y0sQ==
Because call bio_alloc, the bi_rw is zero by default,but in
bio_add_page used the bi_rw. So evalue bi_rw.

Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
---
 drivers/block/xen-blkback/blkback.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/xen-blkback/blkback.c 
b/drivers/block/xen-blkback/blkback.c
index 73f196c..02ca290 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -701,6 +701,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
                        bio->bi_private = pending_req;
                        bio->bi_end_io  = end_block_io_op;
                        bio->bi_sector  = preq.sector_number;
+                       bio->bi_rw      = operation;
                }
 
                preq.sector_number += seg[i].nsec;
-- 
1.7.9.5
<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 2/8] drivers/block/xen-blkback:Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page()., majianpeng <=