Skip to contentSkip to conversation

debugfs fill_bgs command?

DISCUSSION Eric Sandeen 2 participants 3 messages Apr 11, 2007 – Apr 12, 2007

lore
Share & tools
lore
#0 lore raw

I was wondering if others think it would be useful to have a "fill_bgs" command in debugfs; this would (minimally) mark the lower X bgs as full for both inodes & blocks (possibly either/or), to allow testing the higher block groups. I'm using a hacked up version of this to do a little ext3 testing above 8T. Given that this would really only be a testing option in nature, would it be accepted into e2fsprogs? I'd probably need some sort of "unfill" command as well, to put the bg counters back where they should be; probably by actually reading the bitmaps. This way fsck would still find a consistent filesystem...

I had originally written a set_bg_field function too, to go with inode & sb variants, though for marking the first few thousand bg's it was going to get a bit tedious... :)

Thoughts?

Thanks,
-Eric

#1 lore raw
Quoted 10 lines · Eric Sandeen

I was wondering if others think it would be useful to have a "fill_bgs" command in debugfs; this would (minimally) mark the lower X bgs as full for both inodes & blocks (possibly either/or), to allow testing the higher block groups. I'm using a hacked up version of this to do a little ext3 testing above 8T. Given that this would really only be a testing option in nature, would it be accepted into e2fsprogs? I'd probably need some sort of "unfill" command as well, to put the bg counters back where they should be; probably by actually reading the bitmaps. This way fsck would still find a consistent filesystem...

Quoted 3 lines

I had originally written a set_bg_field function too, to go with inode & sb variants, though for marking the first few thousand bg's it was going to get a bit tedious... :)

Try "mke2fs -O lazy_bg XXX" and be happy. Can be used on any kernel as it is a COMPAT feature and marks all but first and last groups as full.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

#2 lore raw
Quoted 2 lines · Andreas Dilger

Try "mke2fs -O lazy_bg XXX" and be happy. Can be used on any kernel as it is a COMPAT feature and marks all but first and last groups as full.

Ugh, how'd I miss that. :)

Thanks...

-Eric