Re: Please review and comment, dealing with btrfs full issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 06, 2014 at 05:43:24PM +0100, Hugo Mills wrote:
> > >So in my case when I hit that case, I had to use dusage=0 to recover.
> > >Anything above that just didn't work.
> > 
> > I suspect when using more than zero the first chunk it wanted to balance
> > wasn't empty - and it had nowhere to put it. Then when you did dusage=0, it
> > didn't need a destination for the data. That is actually an interesting
> > workaround for that case.
> 
>    I've actually looked into implementing a "smallest=n" filter that
> would taken only the n least-full chunks (by fraction) and balance
> those. However, it's not entirely trivial to do efficiently with the
> current filtering code.

I've prototyped something similar, to limit the number of balanced
chunks by a number. To achieve "n least-full chunks" would be an
iterative process of increasing the usage filter and limiting the number
of chunks until the desired N is reached.

N=n
F=0
while (N > 0) {
	balance -dusage=F,limit=N
	N -= <number of balanced chunks>
	F++
}

The patch is in branch dev/balance-limit in my git repos.

We can then implement the n-least-full as a synthetic filter from
userspace.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux