xfs
[Top] [All Lists]

[PATCH 3/8]fs/btrfs: Evalue bio->bi_rw after calling bio_alloc() and bef

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 3/8]fs/btrfs: Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page().
From: majianpeng <majianpeng@xxxxxxxxx>
Date: Mon, 30 Jul 2012 15:24:07 +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=LCpKPJhokJCXcKMhCJMmj6B99naEhY9GphuSjpEKyZs=; b=jAmVdRkaDFaQ7dv7V5l1gx4/FgYPTq5/ors1QI8xQzOIQ/IkLlEFVVS3EcOBxXLNTp LegUPOc/UATGVc4zGJh/BCURhhM35/+5N/e51rAbOSYbRwlrfxnjEb6MWKF8bVbjdj9d 7YCCe6StjQnvmZVedA8zgO/PQPrkBg0yzpzTWj7KJCr45vvNOez53h39gcdZA3zG+Wgq MbR4m5WFfVUXBS5rhGKS47TSLHVnrXh4ijN2uOtacHRrRsIZmN4kZDZk8mEskK9nbqG3 oFx+SWa0vwtQM+0BL2eqRaWcqvcC9sXQTo4pmA8MDiF6T6SQCvdX0A/HXzhaxtkEjR9C ybyw==
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>
---
 fs/btrfs/check-integrity.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 9197e2e..25440aa 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -1700,6 +1700,7 @@ static int btrfsic_read_block(struct btrfsic_state *state,
                bio->bi_sector = dev_bytenr >> 9;
                bio->bi_end_io = btrfsic_complete_bio_end_io;
                bio->bi_private = &complete;
+               bio->bi_rw = READ;
 
                for (j = i; j < num_pages; j++) {
                        ret = bio_add_page(bio, block_ctx->pagev[j],
-- 
1.7.9.5
<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 3/8]fs/btrfs: Evalue bio->bi_rw after calling bio_alloc() and before calling bio_add_page()., majianpeng <=