On Fri, Apr 01, 2011 at 03:36:00PM +0200, Helmut Hullen wrote:
> Hallo, Konstantinos,
> 
> Du meintest am 01.04.11:
> 
> >> "dmesg" counts down the number of remaining "jobs".
> 
> > are you sure? here is a snippet of dmesg from a balance i did
> > yesterday (2.6.38.1)
> 
> > btrfs: relocating block group 15338569728 flags 9
> > btrfs: found 17296 extents
> > btrfs: found 17296 extents
> > btrfs: relocating block group 13191086080 flags 9
> > btrfs: found 21029 extents
> > btrfs: found 21029 extents
> > btrfs: relocating block group 11043602432 flags 9
> > btrfs: found 4728 extents
> > btrfs: found 4728 extents
> 
> Yes - there I look how long the balancing job may still work. You see  
> that the "relocating" line counts down: 15 13 11 ...

   It's not a good measure of time remaining, as the numbers there are
pretty arbitrary: they're the start of the block group in btrfs's own
internal address space. The balance algorithm will indeed go through
the block groups in reverse order, but they're not guaranteed to
terminate at zero. In fact, if you've balanced before, they're pretty
much guaranteed to terminate a long way before zero.

   New block groups (for example, ones created during a balance) are
always created with virtual addresses larger than any previous block
group. So, if you started with block groups at addresses 1G, 2G, 3G,
4G and balanced, you'd end up with ones at 5G, 6G, 7G, 8G. The next
time you balanced, you'd see the numbers count down: 8G, 7G, 6G, 5G,
complete.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
             --- Happiness is mandatory.  Are you happy? ---             

Attachment: signature.asc
Description: Digital signature

Reply via email to