[prev in list] [next in list] [prev in thread] [next in thread]
List: evms-devel
Subject: [Evms-devel] Fw: PATCH - fix for raid1 superblock update in 2.4.19-rc1
From: "Mike \(Cuong\) Tran" <mhtran () us ! ibm ! com>
Date: 2002-06-27 18:59:53
[Download RAW message or body]
FYI. This same fix was made availabe for EVMS RAID1 (md_raid1.c) by Steve
D. yesterday. Thanks, Steve!
Regards,
Mike Tran
----- Original Message -----
From: "Neil Brown" <neilb@cse.unsw.edu.au>
To: "Marcelo Tosatti" <marcelo@conectiva.com.br>
Cc: <linux-raid@vger.kernel.org>
Sent: Thursday, June 27, 2002 11:31 AM
Subject: PATCH - fix for raid1 superblock update in 2.4.19-rc1
>
> Marcelo,
> This patch fixes a little bug in md/raid1 that I noticed during my
> hack/rip/tear at the 2.5 code.
> Thanks,
> NeilBrown
> =================
> Make sure raid1 superblock changes get written out promptly.
>
> mark_disk_bad (called from raid1_error) sets "sb_dirty"
> and wakes-up raid1d to get the superblock written.
>
> However, raid1d only writes the superblock if there are
> pending failed read requests to be retried. So if a device
> fails on a write or an ioctl (raidsetfaulty), then the superblock
> wont be updated.
>
> This patch moves the call to md_update_sb outside of the loop
> in raid1d. This is consistant with the pattern in raid5.
>
>
> ----------- Diffstat output ------------
> ./drivers/md/raid1.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> --- ./drivers/md/raid1.c 2002/06/27 15:36:23 1.1
> +++ ./drivers/md/raid1.c 2002/06/27 16:17:41 1.2
> @@ -1152,9 +1152,12 @@ static void raid1d (void *data)
> struct raid1_bh *r1_bh;
> struct buffer_head *bh;
> unsigned long flags;
> - mddev_t *mddev;
> + raid1_conf_t *conf = data;
> + mddev_t *mddev = conf->mddev;
> kdev_t dev;
>
> + if (mddev->sb_dirty)
> + md_update_sb(mddev);
>
> for (;;) {
> md_spin_lock_irqsave(&retry_list_lock, flags);
> @@ -1165,8 +1168,6 @@ static void raid1d (void *data)
> md_spin_unlock_irqrestore(&retry_list_lock, flags);
>
> mddev = r1_bh->mddev;
> - if (mddev->sb_dirty)
> - md_update_sb(mddev);
> bh = &r1_bh->bh_req;
> switch(r1_bh->cmd) {
> case SPECIAL:
> @@ -1177,7 +1178,6 @@ static void raid1d (void *data)
> int i, sum_bhs = 0;
> int disks = MD_SB_DISKS;
> struct buffer_head *bhl, *mbh;
> - raid1_conf_t *conf;
>
> conf = mddev_to_conf(mddev);
> bhl = raid1_alloc_bh(conf, conf->raid_disks); /* don't really need this
many */
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Evms-devel mailing list
Evms-devel@lists.sourceforge.net
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic