Changeset f34568c in mainline


Ignore:
Timestamp:
2025-06-09T20:42:55Z (2 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Children:
eabc094c
Parents:
e2a8fd2
Message:

hr: print % done of REBUILD operation

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/hrctl/hrctl.c

    re2a8fd2 rf34568c  
    671671        free(scapa);
    672672
    673         printf("|           state: %s\n", hr_get_vol_state_str(info->state));
     673        printf("|           state: %s", hr_get_vol_state_str(info->state));
     674        if (info->state == HR_VOL_REBUILD) {
     675                unsigned int percent =
     676                    (info->rebuild_blk * 100) / info->data_blkno;
     677                printf(" (%u%% done)\n", percent);
     678        } else {
     679                printf("\n");
     680        }
     681
    674682        printf("|         extents:\n");
    675683
  • uspace/lib/device/include/hr.h

    re2a8fd2 rf34568c  
    120120        size_t hotspare_no;
    121121        uint64_t data_blkno;
     122        uint64_t rebuild_blk;
    122123        uint32_t strip_size;
    123124        size_t bsize;
  • uspace/srv/bd/hr/hr.c

    re2a8fd2 rf34568c  
    520520        info.level = vol->level;
    521521        info.data_blkno = vol->data_blkno;
     522        info.rebuild_blk = vol->rebuild_blk;
    522523        info.strip_size = vol->strip_size;
    523524        info.bsize = vol->bsize;
Note: See TracChangeset for help on using the changeset viewer.