Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp20812rdb; Wed, 21 Feb 2024 15:35:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUvwplAjIg/T+pOvTpFNSyb/FCrYgnHiZipRhiD+YYjRVaYeqsevcXEf/oEWdPRgIGYxa3nkSMpt5y3EwfNTsJdSbfWahWK026VexP87Q== X-Google-Smtp-Source: AGHT+IFeowOP0LYVvqCMeGx6Uz3d0LVOt2sXBswek7benV7ryUU9wIAYsKHV7jMzIt4SYK6+lbn5 X-Received: by 2002:a05:6870:1613:b0:21e:b667:20 with SMTP id b19-20020a056870161300b0021eb6670020mr13626940oae.32.1708558503126; Wed, 21 Feb 2024 15:35:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708558503; cv=pass; d=google.com; s=arc-20160816; b=izn0N3PfhxSaCtd0pZVU33ru7W2k2r+iBVzFJj3355QZjrWU0TmVvwS4x3NXh8+sQP ffWYd9rytC0PxcHdomZqhxszWTBArxgILk4DAURkJs50b+VA5G+29Sws4bNYagE1Tx9J yrCTY5bEN8bBOOTtqNwqyB32D+BO4dQaPaJqj0ZRk5foTzBGBz2Jr3SSRrVGCJnZt5HB xKM3+FCHikPADwdnMCxwSrH/76CDKN0jaTTxcEJ2E1r9/Hl/TN7GIRpf25oH3sli2Qy1 obFH2y+ybOsJiE4gv2KF8FPhsgJPD6fE5EcIbvroC1rEkT0ULkKvqKVRTFcJ1u/4N/dh aCvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uxQRWE8qWdWGvPbeyoiI7JXSLfPc5rNq4lsxS+F9O60=; fh=Riwq4UZeuOqKoB4RuDJ0ReAI7BejK7ly1mLG0KQf5QM=; b=HyS+R3aVvWylKyabEJMS0NkrtSfpb+Nyt69s0vFIuDLcLoG6vMlGoTrI3wGqQKYOvd KRYmv5wGge3WVvAxA3ZvvW5mQLQmIM2NPS6C4aAU69+vHngbUtITvEw06TF77VOV2nU4 RChB2mTZ31bM8UwRV6t9gJWYV2+8T66Dx09fUrvAW4emPpdJ3h8yiPIEfuXr9cCfO63h xmAeNde0xLeMPenrcZgQypkg7P8qmQyd+4DHF/+zIDOd9JcSiVi1LRuRC9aOxUcgaRZ3 O/UOPqRVUGRxdiAFS30HD4DFu26a/zKHPofMnVkiGkmuH/F8L5fqGmO2h0qdqlitIYRp jpfg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=Ib6TAnIH; arc=pass (i=1 dkim=pass dkdomain=toxicpanda-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-75497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75497-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k6-20020a635a46000000b005dbee5249fcsi9071621pgm.688.2024.02.21.15.35.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 15:35:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@toxicpanda-com.20230601.gappssmtp.com header.s=20230601 header.b=Ib6TAnIH; arc=pass (i=1 dkim=pass dkdomain=toxicpanda-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-75497-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75497-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B84B32852B5 for ; Wed, 21 Feb 2024 21:08:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD3E11272A1; Wed, 21 Feb 2024 21:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toxicpanda-com.20230601.gappssmtp.com header.i=@toxicpanda-com.20230601.gappssmtp.com header.b="Ib6TAnIH" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C7033A1DB for ; Wed, 21 Feb 2024 21:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708549695; cv=none; b=b95LXSp15zbbk80zCp+PLO6CmHtZdid8B6t09Pl9oKN98uv1APaY16DqEeRZTJeRB8IlD2tq1soLKLi48ziq6tefeNCptqkx71+prPpRnNbyG2is7ouQ84Osqedl8at17kfn0wBOuK+ISoHloO+AAAL7f/FTzHZmvQh9fD+PXFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708549695; c=relaxed/simple; bh=tYBXf2y7UIw2vtxYzTBtooJijhaQRqe+79pKgkHHECI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U96W2MxT/IghniIeN0VdZo83oV3ZclHXfaS8ylEAv16xWu7FWqL5Dkh7x4c4azMd3yyUvmjtoMD2PiQx2nJZO/mWdZg1A7miQxdiWfkxO6DdVOkOhBiMpa9VhqowOOZK7QoSrQCwYXPP3otemzCikVZD9pzzFjZGBVmSPF3UlaU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toxicpanda.com; spf=none smtp.mailfrom=toxicpanda.com; dkim=pass (2048-bit key) header.d=toxicpanda-com.20230601.gappssmtp.com header.i=@toxicpanda-com.20230601.gappssmtp.com header.b=Ib6TAnIH; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toxicpanda.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=toxicpanda.com Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-dcd9e34430cso7256092276.1 for ; Wed, 21 Feb 2024 13:08:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20230601.gappssmtp.com; s=20230601; t=1708549693; x=1709154493; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uxQRWE8qWdWGvPbeyoiI7JXSLfPc5rNq4lsxS+F9O60=; b=Ib6TAnIHxisbMmR1pdPP/BYKP1SLu/iltfPESg72efh8VTH8O4heJ0FN6Ptm18Wrpl sIN1Hw0PRA97PcdRBkW4KuVG2OVcWzyjCQ8MXtBQbxezBH7BbqJ/9hIiexOJHWHXc6hF OvdURRvrdp3UBOg4+kx7ou//gYADUBilg41HTNq66jaGqCBh1VQ1myAtjksKV3+cn1vw nRAa8ZBAOtzaX6N9oQcXB75wMa3Uca5CMcsYmtYB55bb+wv1O8Vh0kMYmHQm5SvdrxzN UMa1ukxvaKArIVeQqtMUn9TfGn/caunRKJn45U9qwty+K4u8n3xu6guyDxC54kkk5Vbe 4wLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708549693; x=1709154493; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uxQRWE8qWdWGvPbeyoiI7JXSLfPc5rNq4lsxS+F9O60=; b=Qx3jBQGagiFRHUraJoOIwHdb1SO1vD98VrTOn5RTHOgpPTlpgQ4cJHPldbqISYM73D stFOiZxHXBz6eMAqEiy6h93rgg7sg9bWZ+8hktn3Pmryx1q3hVZZwZJrpOPqWcsFAFcQ qdfbspgRZ53lNGTUNTweQDwxLP2IO83fD3aU3XsW0GhmD/rKC4+SY3D7qElJ7mxZBcy1 IUTNS/lxkNA+Zv0pBeQwWQfmC/9NP5ulqE17X04DWPyBZ3LmtuRhSpYMnOXj28gb0HEp rvTsArzb4v505U2mTZ7Ck4kulcA8rA0BEvpp2ewbyxXSCMTrX6JBCTf9KaHhPYCFUXcp u8Hw== X-Forwarded-Encrypted: i=1; AJvYcCWaSB9yKmsgpk5+pTF2OhCmz4aJLhHprhQqzsHdOcwMDdOXIvR9eeA3aOgHvYY5z0u/w4LvnOP9bMEXP8hVBx4Fm69+An/8FJT/XTTs X-Gm-Message-State: AOJu0YzCzVL3XU0J+nDW7cfSUYES7MXVDTTJ02HqgTVXizIH1dHfHH5h 2+TW2CjgpWcgmoisy5AkLI9CU0gRmGamywckVqps6RWYsl5cW2PEwGAR2RsK/68= X-Received: by 2002:a05:6902:1b03:b0:dc7:451b:6e33 with SMTP id eh3-20020a0569021b0300b00dc7451b6e33mr517637ybb.46.1708549692880; Wed, 21 Feb 2024 13:08:12 -0800 (PST) Received: from localhost (076-182-020-124.res.spectrum.com. [76.182.20.124]) by smtp.gmail.com with ESMTPSA id i13-20020a25f20d000000b00dcc620f4139sm2483462ybe.14.2024.02.21.13.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 13:08:12 -0800 (PST) Date: Wed, 21 Feb 2024 16:08:11 -0500 From: Josef Bacik To: Miklos Szeredi Cc: Kent Overstreet , linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, lsf-pc@lists.linux-foundation.org Subject: Re: [LSF TOPIC] statx extensions for subvol/snapshot filesystems & more Message-ID: <20240221210811.GA1161565@perftesting> References: <2uvhm6gweyl7iyyp2xpfryvcu2g3padagaeqcbiavjyiis6prl@yjm725bizncq> Precedence: bulk X-Mailing-List: linux-kernel@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: On Wed, Feb 21, 2024 at 04:06:34PM +0100, Miklos Szeredi wrote: > On Wed, 21 Feb 2024 at 01:51, Kent Overstreet wrote: > > > > Recently we had a pretty long discussion on statx extensions, which > > eventually got a bit offtopic but nevertheless hashed out all the major > > issues. > > > > To summarize: > > - guaranteeing inode number uniqueness is becoming increasingly > > infeasible, we need a bit to tell userspace "inode number is not > > unique, use filehandle instead" > > This is a tough one. POSIX says "The st_ino and st_dev fields taken > together uniquely identify the file within the system." > Which is what btrfs has done forever, and we've gotten yelled at forever for doing it. We have a compromise and a way forward, but it's not a widely held view that changing st_dev to give uniqueness is an acceptable solution. It may have been for overlayfs because you guys are already doing something special, but it's not an option that is afforded the rest of us. > Adding a bit that says "from now the above POSIX rule is invalid" > doesn't instantly fix all the existing applications that rely on it. > > Linux did manage to extend st_ino from 32 to 64 bits, but even in that > case it's not clear how many instances of > > stat(path1, &st); > unsigned int ino = st.st_ino; > stat(path2, &st); > if (ino == st.st_ino) > ... > > are waiting to blow up one fine day. Of course the code should have > used ino_t, but I think this pattern is not that uncommon. > > All in all, I don't think adding a flag to statx is the right answer. > It entitles filesystem developers to be sloppy about st_ino > uniqueness, which is not a good idea. I think what overlayfs is > doing (see documentation) is generally the right direction. It makes > various compromises but not to uniqueness, and we haven't had > complaints (fingers crossed). Again, you haven't, I have, consistently and constantly for a decade. > Nudging userspace developers to use file handles would also be good, > but they should do so unconditionally, not based on a flag that has no > well defined meaning. I think that's what we're trying to do, define it properly. We now have 2 file systems in tree that have this sort of behavior. It's not a new or crazy thing (well I suppose it is when you consider the lifetime of file systems), having a way for user space developers that care to properly identify they've wandered across a subvolume boundary could be useful. As for the proposal itself, we talk about this every year. We're all more or less onboard with the idea, the code just needs to be written. Write the code and post the patches, I assume that there won't be much pushback, probably could even get it into Christian's tree in some branch or another before LSF. Thanks, Josef