Recalculate volume size only for real CONCATs. For SINGLE trust volume

size given by metadata, as it should be correct and in some cases can be
smaller then subdisk size.
This commit is contained in:
Alexander Motin 2013-01-17 00:09:50 +00:00
parent 601fce8879
commit ed8180e665
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245519

View File

@ -124,7 +124,8 @@ g_raid_tr_update_state_concat(struct g_raid_volume *vol)
* Some metadata modules may not know CONCAT volume
* mediasize until all disks connected. Recalculate.
*/
if (G_RAID_VOLUME_S_ALIVE(s) &&
if (vol->v_raid_level == G_RAID_VOLUME_RL_CONCAT &&
G_RAID_VOLUME_S_ALIVE(s) &&
!G_RAID_VOLUME_S_ALIVE(vol->v_state)) {
size = 0;
for (i = 0; i < vol->v_disks_count; i++) {