* [PATCH] md/raid5:Not add data_offset when call is_badblock in chunk_aligned_read().
@ 2012-06-12 8:31 majianpeng
2012-06-27 2:16 ` NeilBrown
0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2012-06-12 8:31 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-raid
Signed-off-by: majianpeng <majianpeng@gmail.com>
---
drivers/md/raid5.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index d267672..940f3a7 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3881,8 +3881,6 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio)
raid_bio->bi_next = (void*)rdev;
align_bi->bi_bdev = rdev->bdev;
align_bi->bi_flags &= ~(1 << BIO_SEG_VALID);
- /* No reshape active, so we can trust rdev->data_offset */
- align_bi->bi_sector += rdev->data_offset;
if (!bio_fits_rdev(align_bi) ||
is_badblock(rdev, align_bi->bi_sector, align_bi->bi_size>>9,
@@ -3893,6 +3891,9 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio)
return 0;
}
+ /* No reshape active, so we can trust rdev->data_offset */
+ align_bi->bi_sector += rdev->data_offset;
+
spin_lock_irq(&conf->device_lock);
wait_event_lock_irq(conf->wait_for_stripe,
conf->quiesce == 0,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] md/raid5:Not add data_offset when call is_badblock in chunk_aligned_read().
2012-06-12 8:31 [PATCH] md/raid5:Not add data_offset when call is_badblock in chunk_aligned_read() majianpeng
@ 2012-06-27 2:16 ` NeilBrown
0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2012-06-27 2:16 UTC (permalink / raw)
To: majianpeng; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]
On Tue, 12 Jun 2012 16:31:10 +0800 majianpeng <majianpeng@gmail.com> wrote:
> Signed-off-by: majianpeng <majianpeng@gmail.com>
> ---
> drivers/md/raid5.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index d267672..940f3a7 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -3881,8 +3881,6 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio)
> raid_bio->bi_next = (void*)rdev;
> align_bi->bi_bdev = rdev->bdev;
> align_bi->bi_flags &= ~(1 << BIO_SEG_VALID);
> - /* No reshape active, so we can trust rdev->data_offset */
> - align_bi->bi_sector += rdev->data_offset;
>
> if (!bio_fits_rdev(align_bi) ||
> is_badblock(rdev, align_bi->bi_sector, align_bi->bi_size>>9,
> @@ -3893,6 +3891,9 @@ static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio)
> return 0;
> }
>
> + /* No reshape active, so we can trust rdev->data_offset */
> + align_bi->bi_sector += rdev->data_offset;
> +
> spin_lock_irq(&conf->device_lock);
> wait_event_lock_irq(conf->wait_for_stripe,
> conf->quiesce == 0,
Thanks for catching that!
Patch applied.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-27 2:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 8:31 [PATCH] md/raid5:Not add data_offset when call is_badblock in chunk_aligned_read() majianpeng
2012-06-27 2:16 ` NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).