On Fri, Feb 24, 2017 at 07:23:42AM -0500, Austin S. Hemmelgarn wrote:
> On 2017-02-23 19:54, Qu Wenruo wrote:
> > 
> > 
> > At 02/23/2017 06:51 PM, Christian Theune wrote:
> > > Hi,
> > > 
> > > not sure whether it’s possible, but we tried space_cache=v2 and
> > > obviously after working fine in staging it broke in production. Or
> > > rather: we upgraded from 4.4 to 4.9 and enabled the space_cache. Our
> > > production volume is around 50TiB usable (underlying HW Raid 6).
> > > 
> > > The machine crashes silently every 15 hours or so and takes _ages_ to
> > > reboot. It current is stuck trying to mount the local filesystems and
> > > I guess btrfs is doing something, but I don’t have shell access yet.
> > > 
> > > I’m wondering whether we can downgrade by booting back into 4.4 or
> > > will this break things even further? (We’ve had some unpleasant
> > > surprises with FS’ in the last months, so I thought I’d rather ask.)
> > 
> > You could use "btrfs check --clear-space-cache" to completely cleanup
> > space cache. Both v1(free space cache, file based) or v2(free space
> > tree) are supported.
> > 
> > And specially for v2 space cache (space cache tree), "btrfs check
> > --clear-space-cache" will also clear the ro_compat flag, so older kernel
> > should mount the fs without problem.
> That's really good to know.  I hadn't remembered that using mount options
> didn't clear the flag.

Mounting with -oclear_cache,nospace_cache will clear the free space tree
and the ro_compat flag. Mounting with just -oclear_cache rebuilds the
free space tree (and keeps the ro_compat flag).
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to