Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Anand Suveer Jain <asj@kernel.org>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org, dwmw2@infradead.org,
	thiago.macieira@intel.com, dave.hansen@intel.com
Subject: Re: [PATCH] btrfs: derive f_fsid with dev_t only when temp_fsid is active
Date: Fri, 18 Sep 2026 16:59:09 +0800	[thread overview]
Message-ID: <b18b4324-6bd6-4231-bcb6-1f1f136222e0@kernel.org> (raw)
In-Reply-To: <20260914164617.GN54722@twin.jikos.cz>

On 15/9/26 00:46, David Sterba wrote:
> On Mon, Sep 14, 2026 at 11:42:51AM +0800, Anand Suveer Jain wrote:
>>
>>
>> This issue and its current fix (below) have been on my mind, as I wasn't
>> fully satisfied with the approach even though it works.
>>
>> Now, I think I have a better idea.
>>
>> The core issue isn't that the new f_fsid derivation is wrong (recap:
>> f_fsid derivation changed from f(UUID) to f(UUID + dev_t)). Rather, the
>> problem is that f_fsid changes unexpectedly after an upgrade.
>>
>> So we need to address the upgrade behavior, not how f_fsid itself is
>> derived.
>>
>> My new proposed solution:
>>
>>  . Put the new f_fsid derivation behind a compile-time config flag (an
>> incompat/opt-in flag).
> 
> A compile-time change should be only something really significant for
> the whole filesystem. Configs rarely change and except
> developers/embedded/custom builds it's hard to change, speaking about
> distros.

I'm responding to other emails collectively here:

In that case, I think it's better to revert the commit c2a74ed0494c
("btrfs: derive f_fsid from on-disk fsid and dev_t"). That gives us
consistent statfs f_fsid behavior in the new kernel and for
temp_fsid-mounted filesystems, f_fsid will be the random value generated
at mount time, and it becomes the responsibility of the use case to
change the UUID (and move away from relying on temp_fsid) if persistent
identification is required. btrfs(5) is updated [1] in the ML.

 [1]
https://lore.kernel.org/linux-btrfs/20260918084612.ZxGVtNO9DAJfevT0EwV5BlMy-4qgIyRKK6TAZ5oNLtU@z/

      reply	other threads:[~2026-09-18  8:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 18:06 [PATCH] btrfs: derive f_fsid with dev_t only when temp_fsid is active Anand Jain
2026-09-12 21:58 ` Dave Hansen
2026-09-13  1:05   ` Anand Suveer Jain
2026-09-13  1:13     ` Dave Hansen
2026-09-13  2:43       ` Anand Suveer Jain
2026-09-14  3:42 ` Anand Suveer Jain
2026-09-14  5:28   ` David Woodhouse
2026-09-14  8:28     ` Anand Suveer Jain
2026-09-14 10:47       ` David Woodhouse
2026-09-14 12:28         ` Anand Suveer Jain
2026-09-14 16:41         ` David Sterba
2026-09-14 16:39       ` David Sterba
2026-09-14 16:46   ` David Sterba
2026-09-18  8:59     ` Anand Suveer Jain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b18b4324-6bd6-4231-bcb6-1f1f136222e0@kernel.org \
    --to=asj@kernel.org \
    --cc=dave.hansen@intel.com \
    --cc=dsterba@suse.cz \
    --cc=dwmw2@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=thiago.macieira@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox