(md: Online Capacity Expansion for IMSM) The following series implements Online Capacity Expansion in md for Raid0 or Raid5 arrays build on IMSM's metadata. It allows for adding new hard drive(s) to existing IMSM Raid0 or Raid5 array. Online Capacity Expansion for External Metadata requires Takeover functionality in md and mdadm. Algorithm looks as follows: 1. mdadm: For Raid0 array, execute takeover to Raid5 2. mdadm: set new raid disks number to md using raid_disks entry in sysfs 3. mdadm: call update_super() to configure added disks from spares pool (add them to md configuration) and prepare metadata update 4. mdadm: run reshape using sync_action entry in sysfs 5. md : starts reshape 6. mdmon: detects change in md configuration (increases number of disks) 7. mdmon: reallocates active_array structure and external metadata specific structures using grow_array() vector to avoid memory corruption during metadata update processing. 8. mdadm: post metadata update to mdmon (mdmon is ready to receive it) 9. mdmon: process metadata update and calculate new array size. Store new array size with metadata update on disks. ... reshape ... 10. md : finishes reshape, array size is not increased by md as it is managed externally 11.mdmon: finishes migration in metadata 12.mdadm: reads array size from metadata and sets it to md 13.mdadm: For Raid0 array, execute takeover from Raid5 to Raid0 For IMSM, it is required to expand all arrays in container at time, so reshape has to be run on container and it is changed to serial execution for every array in container (implemented in mdadm). Feature is treated as experimental due to Windows compatibility during reshape process, so last patch in mdadm patch series puts check to the code for EXPERIMENTAL compilation flag usage during mdadm compilation. md for this feature works for Raid5 arrays only (raid0 arrays are after takeover to raid5). Raid5 reshape engine for native metadata is unchanged. Patches makes the following code changes: 1. Use disks added by mdadm in reshape process for external metadata: md: Fix: 'degraded' calculation when starting reshape for external meta md: Use added disks for external metadata case in start_reshape() md: Fix: max_disks limit set for external metadata 2. Configure added by mdadm disks to avoid i/o errors for external metadata md: Fix: BIO I/O Error during reshape for external meta 3. Set flags maintained while native metadata is read and written to the array for external metadata to allow reshape to work. md: Enable reshape for external metadata md: Fix: max_disks limit set for external metadata --- Adam Kwolek (5): md: Fix: 'degraded' calculation when starting reshape for external meta md: Fix: BIO I/O Error during reshape for external meta md: Use added disks for external metadata case in start_reshape() md: Enable reshape for external metadata md: Fix: max_disks limit set for external metadata drivers/md/md.c | 26 +++++++++++++++++++------- drivers/md/raid5.c | 31 +++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 9 deletions(-) -- Signature ��.n��������+%������w��{.n�����{����w��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f