summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bad block logdevel-3.3NeilBrown2011-07-271-5/+36
|
* Set version number to signal a prerelease of 3.3NeilBrown2011-07-271-1/+1
| | | | | | This might help avoid some confusion. Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm.8.in: clarify some issues with --sizeNeilBrown2011-07-271-7/+21
| | | | | | | | | - explain it's use in guarding against small replacements - clarify relationship with containers. - include information about --grow --size not being supported by IMSM metadata. Reported-by: maciej.naruszewicz <maciej.naruszewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Grow: fix version number in error messageNamhyung Kim2011-07-261-1/+1
| | | | | | | | As the conditional checks, reshape to fewer devices is supported since Linux kernel 2.6.30 not 2.6.32. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: fix default chunk in the !orom caseDan Williams2011-07-192-27/+20
| | | | | | | | | Set a valid default in the !orom case, otherwise we segfault, or otherwise fail. Cc: Anna Czarnowska <anna.czarnowska@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: getinfo_super_imsm_volume() doesn't fill all disk informationNeilBrown2011-07-142-14/+6
| | | | | | | | | | | | | getinfo_super_imsm_volume doesn't correctly set info.disk fields because it doesn't know which disk to set them from. It should be the last disk passed to add_to_super. So add a field 'current_disk' to record this disk in add_to_super, and use it in getinfo_super. This allows us to remove a hack in Create.c Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm: fix build failures (ppc64)Milan Broz2011-07-141-3/+6
| | | | | | | | | | | | | | This patch fixes these build issues: super-intel.c: In function 'getinfo_super_imsm_volume': super-intel.c:2327:4: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type '__u64' [-Werror=format] super-intel.c: In function 'imsm_reshape_super': super-intel.c:8665:7: error: 'devnum' may be used uninitialized in this function [-Werror=uninitialized] Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* super-intel: fix buffer overflow in detail-platform.NeilBrown2011-07-131-2/+2
| | | | | | | | The serial number is not necessarily nul terminated, so we need to be sure to only use the allowed number of chars. Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: Arvin Schnell <aschnell@novell.com>
* md.4: fix possible typosNamhyung Kim2011-06-281-3/+3
| | | | | Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* mdmon.8: fix possible typosNamhyung Kim2011-06-281-2/+2
| | | | | Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Show DELAYED, PENDING status of resync process in "--detail"Krzysztof Wojcik2011-06-233-13/+15
| | | | | | | | | | | | | | | | Initially there is no proper translation mdstat's DELAYED/PENDING processes to "--detail" output. For example, if we have recover=DELAYED in mdstat, "--detail" shows "State: recovering" and "Rebuild Status = 0%". It was incorrect in case of process waiting on checkpoint different than 0%. In fact rebuild status is differnt than 0% and user is misled. The patch fix the problem. Current "--detail" command shows in the exampe: "State: recovering (DELAYED)" and no information about precentage. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm --detail was incorrect for shrinking reshapesAndrew Burgess2011-06-231-4/+1
| | | | | | | | Since info->delta_disks is signed it doesn't need to be special-cased. This allowed my 9->8 reshape to display correctly instead of as 8->7 Signed-off-by: NeilBrown <neilb@suse.de>
* .gitignore: ignore mdadm.8 fileNamhyung Kim2011-06-231-0/+1
| | | | | | | mdadm.8 is auto-generated from mdadm.8.in, so ignore it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm.8: fix possible typosNamhyung Kim2011-06-231-11/+12
| | | | | | | | Fix random typos and add a few of missing words/macros. Also update RAID website URL as it is not accessible anymore. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm.8: move description of --add under Grow modeNamhyung Kim2011-06-231-22/+27
| | | | | | | | It is supposed to be under Grow mode. Since Create/Build/Grow modes use common options and '-a' is already used for '--auto' in Create/ Build modes, describe it to avoid confusion. Signed-off-by: NeilBrown <neilb@suse.de>
* mdadm.8: change linux version 2.6.40 -> 3.0Namhyung Kim2011-06-232-2/+2
| | | | | Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
* util: correctly parse shorter linux version numbers.NeilBrown2011-06-171-5/+5
| | | | | | | | | | The next version of Linux might be 3.0. If it is, get_linux_version will fail. So make it more robust. Reported-by: Namhyung Kim <namhyung@gmail.com> Reported-by: Milan Broz <mbroz@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Release mdadm-3.2.2mdadm-3.2.2NeilBrown2011-06-177-5/+44
| | | | Stability release
* Don't index past the end of 'best' array in Assemble.NeilBrown2011-06-171-1/+1
| | | | | | | | The 'best' array only has 'bestcnt' entries allocated, so 'i' should always be "< bestcnt", not "<= bestcnt". Reported-by: "Lawrence, Joe" <Joe.Lawrence@stratus.com> Signed-off-by: NeilBrown <neilb@suse.de>
* Improvements to GPT reading code.Luca Berra2011-06-171-18/+9
| | | | | | | | | | | | | looking at the gpt code in util.c i found i did not like it at all, a gpt partition entry is currently 128 bytes, but the spec does not say it is a fixed value, so the code that reads into a buffer with 512bytes chunk expecting this to be a multiplier of part_size is imho incorrect. my fix was to read each partition entry directly into a struct GPT_part_entry, the advantage is that the code is very simple to read, the disadvantage it is 128 reads of 128 bytes each, which is sub-optimal, but i believe readahead will mitigate this a lot. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix some type-aliasing issues.Luca Berra2011-06-173-4/+12
| | | | | | | Warnings for these are reported with -Wstrict-aliasing=2, and avoiding the cast is certainly an improvement. Signed-off-by: NeilBrown <neilb@suse.de>
* Fix some compiler warnings.Luca Berra2011-06-175-9/+16
| | | | | | Original by Luca, with various changes by Neil Signed-off-by: NeilBrown <neilb@suse.de>
* Various fixes so that "make everything" works.NeilBrown2011-06-161-13/+14
| | | | | | | In particular: protect some stuff from MDASSEMBLE and report and error from 'write'. Signed-off-by: NeilBrown <neilb@suse.de>
* More fixes for tests.NeilBrown2011-06-164-8/+8
| | | | | | Some more fixes to help some tests run properly. Signed-off-by: NeilBrown <neilb@suse.de>
* test/ddf add a udevadm settleNeilBrown2011-06-151-0/+1
| | | | | | We need to settle udev before assuming the devices exist. Signed-off-by: NeilBrown <neilb@suse.de
* Remove more duplicated codeNeilBrown2011-06-153-76/+15
| | | | | | | Code from env-imsm-template is also in 09imsm-create-fail-rebuild, so remove it from there. Signed-off-by: NeilBrown <neilb@suse.de>
* tests/08imsm-overlap - remove duplicated codeNeilBrown2011-06-151-54/+6
| | | | | | | This test contains a lot of code that is also in env-imsm-template. So remove it and simple source the other. Signed-off-by: NeilBrown <neilb@suse.de>
* ddf: fix up getinfo_super_bvdNeilBrown2011-06-151-4/+8
| | | | | | | Now that getinfo_super clears the info structure, we need to make sure the correct values are filled in to info->dev. Signed-off-by: NeilBrown <neilb@suse.de>
* Remove compiler warning about signed/unsigned comparison.Albert Pauw2011-06-151-2/+2
| | | | Signed-off-by: NeilBrown <neilb@suse.de>
* Fix imsm-overlap test.NeilBrown2011-06-152-8/+10
| | | | | | | | | Now that we reserve space for migration buffer devices are a little bit smaller so we need to allow for that in the test suite. Also add a 'udevadm settle' - it seems to help Signed-off-by: NeilBrown <neilb@suse.de>
* Incr: fix breakage in count_active.NeilBrown2011-06-151-1/+2
| | | | | | | | | | If the second device is much newer than the first, but has a lower raid_disk number, we clear 'avail' badly and don't set up 'best' properly. Fix these things. Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: Metadata Attributes compatibility supportAdam Kwolek2011-06-151-9/+137
| | | | | | | | | | | | | IMSM's meta data contains Attributes field that contains information about supported features. To assembly an array mdadm has to support all features specified by attributes. The patch introduces new attributes support and validation of the attribuses during an array assembly. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Sometimes reshape cannot be finishedAdam Kwolek2011-06-151-5/+15
| | | | | | | | | | | When array size is not aligned to copy area, number of migration unit is increased in init_migr_record_imsm():7665 to reshape whole array. During calculation of last migration unit, this should be in mind also, otherwise checkpoint (max-1) is always written and reshape is never finished in mdadm. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: klocwork: passed dev pointer to is_gen_migration() can be NULLAdam Kwolek2011-06-141-0/+3
| | | | | | | Pointer dev2 passed in write_super_imsm():4451 can be equal to NULL. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: Fix: klocwork: targets variable can be used uninitializedAdam Kwolek2011-06-141-1/+3
| | | | | | | | | | When target_offsets allocation fails execution goes to abort label, where elements from targets table are closed. Initialize targets table after allocation. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Migration Raid0->Raid5 cannot be restarted correctlyAdam Kwolek2011-06-141-1/+0
| | | | | | | | | | | | | When array raid0 is migrated to raid5, reshape cannot be continued correctly due to wrong array parameters settings. Raid disks number is set too big. There is no need, during raid0->raid5 migration to increase info->array.raid_disks, it is already set to final value using designation map information. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Raid5 data corruption data recovering from backupAdam Kwolek2011-06-141-1/+8
| | | | | | | | | | | | | | | | | | Sporadicaly when Raid5's data are restored from backup area, corruption occurs. It doesn't happen if reshape process is beyond critical section. Root cause of the problem is passing wrong starting point in restore_stripes(). It was hard coded to 0 so far. This causes that parity disks position in first stripe was always set to the last raid disk. This position should depend on data position in array. Proper start position was set and pointer for restoring data (copy area address) is adjusted to passed start parameter. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Disable automatic metadata rollback for broken reshapeAdam Kwolek2011-06-141-1/+5
| | | | | | | | | | | | | | mdmon cannot rollback metadata changes automatically. It can break reshape process in the way that in case of reshape break user will not be able to deal with broken reshape due to lack of information about reshape geometry. mdadm (process that invokes reshape) doesn't make any rollback to allow for user action. mdmon should not do this either unless it knows for sure it is save. such knowledge is not available for automatic rollback. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Use function to obtain array layoutAdam Kwolek2011-06-141-4/+2
| | | | | | | Function imsm_level_to_layout() should be use to get array layout. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* FIX: Cannot create volumeAdam Kwolek2011-06-141-1/+9
| | | | | | | | | | getinfo_super() can clear entire 'inf' structure before filling with new information. Disk number required later is lost. Restore disk number information after getinfo_super() call. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* MAN: Man update for check-pointingAdam Kwolek2011-06-091-2/+7
| | | | | Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: Optimize expansion speed when no backup is requiredAdam Kwolek2011-06-091-0/+8
| | | | | | | | When no reshape backup is required (e.g. OLCE after critical section), check-pointing can use bigger steps than backup space allows for. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Remove timeout from wait_for_reshape_imsm()Adam Kwolek2011-06-091-10/+5
| | | | | | | Timeout should not be used for select function in wait_for_reshape_imsm(). Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: wait_for_reshape_imsm() cleanupAdam Kwolek2011-06-091-21/+33
| | | | | | | | | | | This function needs to be corrected. It should check sysfs operations status and it should not interpret 0 reshape position special meaning. Unused input parameter is removed also. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Do not continue reshape when backup existsAdam Kwolek2011-06-091-0/+7
| | | | | | | | When backup exists in copy area reshape cannot be continued. In such situation, array is in unstable state. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* FIX: Move buffer to next locationAdam Kwolek2011-06-091-1/+5
| | | | | | | | | | | | | When no output file is given save_stripes() should collect amount of stripes in passed buffer. Currently all stripes are saved in the same area in passed buffer. This causes that last stripe is returned on buffer begin only. Increase buffer (buf) pointer when save_stripes() is about switch to next stripe operation. This allows for proper buffer filling as input parameter length directs. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Remove unused variables and codeAdam Kwolek2011-06-091-13/+1
| | | | | | | Unused variables and code can be removed from imsm_manage_reshape() Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Move reshape_progress forwardAdam Kwolek2011-06-091-10/+13
| | | | | | | | | When array under reshape is assembled, reshape position used in sysfs_set_array() should be set to position after recovered from backup area. This avoids data corruption due to reshape the same array area again. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Detect failed devices during recover_backup_imsm()Adam Kwolek2011-06-091-0/+14
| | | | | | | | | Detect in recover_backup_imsm() if not opened disks number is smaller than allowed degradation for given raid level. This allows for reshape restart on degraded array. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
* imsm: FIX: Use metadata information for restore_stripes() and save_stripes()Adam Kwolek2011-06-091-8/+17
| | | | | | | | | For raid0 reshape imsm uses degraded raid4 for this operation. Using real raid level (raid0) for stripe calculation causes no need for parity calculation and can speed up reshape process. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>