Changeset 6123753 in mainline


Ignore:
Timestamp:
2025-03-06T19:42:14Z (4 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
4d42a1b
Parents:
4d30c475
Message:

hr: raid1.c: print rebuild progress every 5%

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/raid1.c

    r4d30c475 r6123753  
    541541        hr_range_lock_t *rl = NULL;
    542542
     543        unsigned int percent, old_percent = 100;
    543544        while (left != 0) {
    544545                cnt = min(max_blks, left);
     
    555556                rc = hr_raid1_restore_blocks(vol, rebuild_idx, ba, cnt, buf);
    556557
     558                percent = ((ba + cnt) * 100) / vol->data_blkno;
     559                if (percent != old_percent) {
     560                        if (percent % 5 == 0)
     561                                HR_DEBUG("\"%s\" REBUILD progress: %u%%\n",
     562                                    vol->devname, percent);
     563                }
     564
    557565                hr_range_lock_release(rl);
    558566
     
    562570                ba += cnt;
    563571                left -= cnt;
     572                old_percent = percent;
    564573        }
    565574
     
    714723    uint64_t ba, size_t cnt, void *buf)
    715724{
    716         HR_DEBUG("REBUILD restoring blocks (ba: %lu, cnt: %lu)\n", ba, cnt);
    717 
    718725        assert(fibril_rwlock_is_locked(&vol->extents_lock));
    719726
Note: See TracChangeset for help on using the changeset viewer.