From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E8F4259C9C for ; Thu, 9 Apr 2026 04:12:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775707922; cv=none; b=lBMQdq2Qc7Sh5Qf9+gxvTQ22f2AoLUSQJPObVVEybDjlnlDnCXTWEAyGW1V9L4hf1wHCHuQgWYe9O9bhmH7I3F5m8GOYVYXXWnWyz+j2ej2H+MuY0/4yHXiseomo5esuTuagADnAE/CdMvnTyjySyVQYZrm9l5TV5S7XSNMbO74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775707922; c=relaxed/simple; bh=6YHfrpk1CLmgitkyrjwN+HR9dP3AJnFyvTSvr+bFdDY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EWzM4B9f8EQKg9uo8goEMkTd9dQhr5lOlKT8sSTeNJruLybMZKat2IdB/6Rl0SV3Yqxn/wU14G2l/nhjW6FMt9Lsb7fUIzL9Rv2A1O1sfjuQWf+aUjjtFk2EzaisMOfdSh0jyyfcTCey/XXcYQ9vh9uMYG42LfZ3/GlnwbcK6Zk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=PQurBuLz; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="PQurBuLz" Received: from macsyma.thunk.org (pool-173-48-116-90.bstnma.fios.verizon.net [173.48.116.90]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 6394Bakp013983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 Apr 2026 00:11:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1775707899; bh=NBFukzxQNIlbpu4dR1BAdcrERQuSpFgXbePc35/CAcQ=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=PQurBuLzZ1AJBBaBEtKJQ2CAbaNk78ZzQ/69Sr7DZbFPK+9IJybrvvx8OEoBmt0K/ zZu31CKmU5WLkwCcTmVy29QPU8jaAGhUWRbnsm18GtjIxGjrcrWZKRcJAHI9xQNQfp DnHbaJ7lF1dRStlbJL+qQlHVCeI+leVoZ+ee+4GXaTkxm/NKeWB6pgyiYzetQYAgtL JfWWBFoKDi8Mu9On1wilzEsFAjM/K3XL7RbyiGetEYu5UtiZRJOIXmI2SQkDv/Xtei NeECjPfMgW+OdGkv5wnbai8oA4DyT0njG5I56F96F15ZWwLxUQHWKXNheb9YV3Grex iLe9tyRKGI8bw== Received: by macsyma.thunk.org (Postfix, from userid 15806) id C9709625964A; Thu, 9 Apr 2026 00:10:35 -0400 (EDT) Date: Thu, 9 Apr 2026 00:10:35 -0400 From: "Theodore Tso" To: Anand Jain Cc: Christoph Hellwig , "Darrick J. Wong" , linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, Anand Jain Subject: Re: [PATCH v2 3/3] ext4: derive f_fsid from block device to avoid collisions Message-ID: <20260409041035.GC99725@macsyma-wired.lan> References: <33e8eb64c304a4d42b60f608c26497bf9a2e9e19.1774092915.git.asj@kernel.org> <20260323041624.GA11453@mac.lan> <5bda3d00-df35-4ea1-b313-2fef6e5c5682@gmail.com> <20260407144709.GA81690@macsyma-wired.lan> <3c9e478a-42ef-446f-a8cc-1b4ac970d2ef@gmail.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c9e478a-42ef-446f-a8cc-1b4ac970d2ef@gmail.com> On Thu, Apr 09, 2026 at 06:28:32AM +0800, Anand Jain wrote: > Some A/B testing use cases require the filesystem to remain > byte-for-byte identical. In those scenarios, changing the UUID > isn't an option. But in that case, where the file systems A and B are bit-fot-bit identical, why do we care whether statfs returns different fsid's for statfs(A) and statfs(B). After all, f_fsid is only defined as "File system ID", and there is no other definition. Which is why I say that people *really* shouldn't depending on its semantics, because it's not well defined. Quoting from the statfs(2) man page: Nobody knows what f_fsid is supposed to contain (but see below). ... The general idea is that f_fsid contains some random stuff such that the pair (f_fsid,ino) uniquely determines a file. Some operating systems use (a variation on) the device number, or the device number combined with the filesystem type. Several operating systems restrict giving out the f_fsid field to the superuser only (and zero it for unprivileged users), because this field is used in the filehandle of the filesystem when NFS-exported, and giving it out is a security concern. So if the two file systems are identical, the (f_fsid, ino) will uniquely determines a file. And that's *fine* if f_fsid is the same for statfs(A) and statfs(B). No? - Ted