Re: [PATCH] btrfs: do not zero f_bavail if we have available space

Marc MERLIN
2020-02-19T15:37:04Z

On Wed, Feb 19, 2020 at 03:31:14PM +0100, David Sterba wrote:
> On Wed, Feb 19, 2020 at 05:43:27AM -0800, Marc MERLIN wrote:
> > On Wed, Feb 19, 2020 at 10:17:24AM +0100, Martin Steigerwald wrote:
> > > Marc MERLIN - 19.02.20, 01:42:57 CET:
> > > > Has the patch gotten to any 5.5 release too?
> > >
> > > Yes, as git log easily reveals.
> >
> > Sorry if I suck, but right now I only have pre-made kernel releases from
> > kernel.org.
> > This bug in 5.4 messed up some of my dm-thin volumes which now took 28% of a dm-thin
> > 14TB pool when the actual data is only using 4GB :( (at the same time it
> > also shows my FS is full when of course it's not).
> >
> > I'll likely have to destroy the dm-thin to recover that space (or maybe
> > not, we'll see), but I'm travelling and don't really have countless time
> > to allocate to this.
> > If 5.5.4 is supposed to fix this too, I'll build it, install it and hope
> > it reclaims my lost dm-thin space, and if not suck up the deletion,
> > re-creation and backup/restore.
>
> The fix got to stable 5.5.2 and 5.4.18. I don't know if dm-thin actually
> allows that, but is there a non-destructive way to reclaim the space?
> Like using fstrim (the filesystem can tell the underlying storage which
> blocks are free). According to
> http://man7.org/linux/man-pages/man7/lvmthin.7.html ("Manually manage
> free data space of thin pool LV") this should work but I have no
> practical experience with that.

Thanks. For some reason, debian's latest make-kpkg hangs forever on 5.5
kernels (not sure why) so I can't build it right now, but I just got
5.4.20 and I'm compiling that now, thanks.
As for dm-thin, I'm not sure yet, I'll find out when the new kernel is
installed. I was also hoping fstrim would work, I guess I'll find out.

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.

Home page: http://marc.merlins.org/ | PGP 7F55D5F27AAF9D08