Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 298976 Details for
Bug 194585
mdadm --grow -n 2 (old: 3) fails on particular raid1 devices
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
fix backported to RHEL4.6
kernel-el4-raid1.patch (text/plain), 1.83 KB, created by
David Robinson
on 2008-03-25 05:54:29 UTC
(
hide
)
Description:
fix backported to RHEL4.6
Filename:
MIME Type:
Creator:
David Robinson
Created:
2008-03-25 05:54:29 UTC
Size:
1.83 KB
patch
obsolete
>--- kernel-2.6.9/linux-2.6.9/drivers/md/raid1.c.orig 2008-02-01 10:18:56.000000000 +1000 >+++ kernel-2.6.9/linux-2.6.9/drivers/md/raid1.c 2008-03-25 15:11:10.000000000 +1000 >@@ -1353,17 +1353,26 @@ static int raid1_reshape(mddev_t *mddev, > * We allocate a new r1bio_pool if we can. > * Then raise a device barrier and wait until all IO stops. > * Then resize conf->mirrors and swap in the new r1bio pool. >+ * >+ * At the same time, we "pack" the devices so that all the missing >+ * devices have the higher raid_disk numbers. > */ > mempool_t *newpool, *oldpool; > struct pool_info *newpoolinfo; > mirror_info_t *newmirrors; > conf_t *conf = mddev_to_conf(mddev); >+ int cnt; > >- int d; >+ int d, d2; > >- for (d= raid_disks; d < conf->raid_disks; d++) >- if (conf->mirrors[d].rdev) >+ if (raid_disks < conf->raid_disks) { >+ cnt=0; >+ for (d= 0; d < conf->raid_disks; d++) >+ if (conf->mirrors[d].rdev) >+ cnt++; >+ if (cnt > raid_disks) > return -EBUSY; >+ } > > newpoolinfo = kmalloc(sizeof(*newpoolinfo), GFP_KERNEL); > if (!newpoolinfo) >@@ -1394,8 +1403,12 @@ static int raid1_reshape(mddev_t *mddev, > /* ok, everything is stopped */ > oldpool = conf->r1bio_pool; > conf->r1bio_pool = newpool; >- for (d=0; d < raid_disks && d < conf->raid_disks; d++) >- newmirrors[d] = conf->mirrors[d]; >+ >+ for (d=d2=0; d < conf->raid_disks; d++) >+ if (conf->mirrors[d].rdev) { >+ conf->mirrors[d].rdev->raid_disk = d2; >+ newmirrors[d2++].rdev = conf->mirrors[d].rdev; >+ } > kfree(conf->mirrors); > conf->mirrors = newmirrors; > kfree(conf->poolinfo); >@@ -1404,6 +1417,7 @@ static int raid1_reshape(mddev_t *mddev, > mddev->degraded += (raid_disks - conf->raid_disks); > conf->raid_disks = mddev->raid_disks = raid_disks; > >+ conf->last_used = 0; /* just make sure it is in-range */ > spin_lock_irq(&conf->resync_lock); > conf->barrier--; > spin_unlock_irq(&conf->resync_lock);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194585
: 298976