From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f6UqrTO2" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB99C7 for ; Tue, 12 Dec 2023 01:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702372257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I7ZVrBJyXKr/n09YqdF0KAlAORhTC6QEemZm9T0wEqo=; b=f6UqrTO2jJDbWl30U3dWnda4iI/YdWVD4B6iSdRDxjlnrdr9HcdVF3SsB5ZFxkLC17isF+ CNwCJPuCuhyQswGHS7FIjXvrEuLvYfQCPfWlMArdrBl9R0L16ZPk0sGKpzIUFasSRzqkEF yWCREhNOuSIHgCVV46pEvKMSm8r89fU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-439-s5QyglmjPAiXL-CyQoXkHA-1; Tue, 12 Dec 2023 04:10:51 -0500 X-MC-Unique: s5QyglmjPAiXL-CyQoXkHA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6884288B783; Tue, 12 Dec 2023 09:10:50 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75DDD492BC6; Tue, 12 Dec 2023 09:10:48 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20231212-impfung-linden-6f973f2ade19@brauner> References: <20231212-impfung-linden-6f973f2ade19@brauner> <20231208024919.yjmyasgc76gxjnda@moria.home.lan> <630fcb48-1e1e-43df-8b27-a396a06c9f37@molgen.mpg.de> <20231208200247.we3zrwmnkwy5ibbz@moria.home.lan> <170233460764.12910.276163802059260666@noble.neil.brown.name> <20231211233231.oiazgkqs7yahruuw@moria.home.lan> <170233878712.12910.112528191448334241@noble.neil.brown.name> <20231212000515.4fesfyobdlzjlwra@moria.home.lan> <170234279139.12910.809452786055101337@noble.neil.brown.name> To: Christian Brauner Cc: dhowells@redhat.com, Amir Goldstein , Dave Chinner , NeilBrown , Kent Overstreet , Donald Buczek , linux-bcachefs@vger.kernel.org, Stefan Krueger , linux-fsdevel@vger.kernel.org, Josef Bacik , linux-btrfs@vger.kernel.org Subject: Re: file handle in statx (was: Re: How to cope with subvolumes and snapshots on muti-user systems?) Precedence: bulk X-Mailing-List: linux-bcachefs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2810684.1702372247.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Tue, 12 Dec 2023 09:10:47 +0000 Message-ID: <2810685.1702372247@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 Christian Brauner wrote: > > > > I suggest: > > > > > > > > STATX_ATTR_INUM_NOT_UNIQUE - it is possible that two files have t= he > > > > same inode number > = > This is just ugly with questionable value. A constant reminder of how > broken this is. Exposing the subvolume id also makes this somewhat redun= dant. There is a upcoming potential problem where even the 64-bit field I placed= in statx() may be insufficient. The Auristor AFS server, for example, has a 96-bit vnode ID, but I can't properly represent this in stx_ino. Currentl= y, I just truncate the value to fit and hope that the discarded part will be al= l zero, but that's not really a good thing to do - especially when stx_ino i= s used programmatically to check for hardlinks. Would it be better to add an 'stx_ino_2' field and corresponding flag? David