From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f53.google.com ([209.85.214.53]:36152 "EHLO mail-it0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751277AbdBXMaY (ORCPT ); Fri, 24 Feb 2017 07:30:24 -0500 Received: by mail-it0-f53.google.com with SMTP id h10so18101702ith.1 for ; Fri, 24 Feb 2017 04:30:24 -0800 (PST) Subject: Re: Downgrading kernel 4.9 to 4.4 with space_cache=v2 enabled? To: Qu Wenruo , Christian Theune , linux-btrfs@vger.kernel.org References: From: "Austin S. Hemmelgarn" Message-ID: Date: Fri, 24 Feb 2017 07:23:42 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: 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.