Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp286431rdb; Thu, 22 Feb 2024 03:55:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXP5+cZ3dnn+tq0KU4N+KzSEKRQ7Fp7+E5nuENd0eaTyOFotnYdE/spwzAodw5s+dY+0iyThW8HszTDQBgaZ3LyvH3QU+VLr2R3AKRnjw== X-Google-Smtp-Source: AGHT+IFNw2yceMOrN+QrI8d0aY9lUhq1dEX+XYkoHyYSZNyG5XbY2BjjA5cfjokHC9wuDU+bVIZN X-Received: by 2002:a05:6214:19c4:b0:68f:43f6:4834 with SMTP id j4-20020a05621419c400b0068f43f64834mr18982982qvc.26.1708602949962; Thu, 22 Feb 2024 03:55:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708602949; cv=pass; d=google.com; s=arc-20160816; b=Uksr/O3y6pxvxFNY8mzKGBmZf4KTqzX9TZWKu/OeL5hvsWkvqFVcZscVGMqCPEiSdF hvoLd0XobfSeDjYVcLxTmR9/tpax0ibs4WkFgdfKHaptkTQsBFFYDXj1pkxSgNXWufFK mPFMF7Mo7PI0XWSao2TRY+F+nZ+r0kYG4E8Td00mgnW/xdkexQI9eimznbziXqMPTWai j2MQo0rhObplg/22OLU0L1hG26zaFSoumD5g7xYu0/of29Pfx+HdaupjDJ0rsOEP4TOf 7mhk5V5Nxkc5oYCS0EvJVWLjm6I+iIzeYJk9f2gezVdxcfmG2zrbcWrnLh1gf4QBsvsg EHQw== 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:dkim-signature:date; bh=ZOSNF//i8qwwUlDAqBjDcUQ68DsRV1xIVPVD8Mb3zPM=; fh=kFF5Orirdi9YaT2F8QPOQdceR2gI4qaj3pDe08VyrcE=; b=bmKm/H5P0+1l7oUI1ofHxI7WNEZDS0kLtKGzH4aKlnXIy6rYvGxvLvIwxKfOoXXOiG wpkNB61U+JmGJKAYZSud6gtgizqD+YUDtPs6V9fQ0e62OfrpUd9tVU5KmsTWIQKAustN BTUc31lt2UozxmN/2u1ZFr93MdOZ9EL0otxJU8KlQFb3U6o7/NvGbseJaIrB3MFnYOch G8nPi5m5CdV/I0Ykkgd0uw1E1ZShx4x285c0GkVutaq8/H1+iDYFzEoo4+sVOc6sXKbA Opcj9lfJQpB3Gb/xcQ26hMa568XesLHmaf4gbBFcCWp7l+gvPGyHpivCjUhfAayBOBN+ XBbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lRDl0nHn; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-76467-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76467-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gv15-20020a056214262f00b0068f89d82bb1si6714354qvb.155.2024.02.22.03.55.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:55:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76467-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lRDl0nHn; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-76467-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76467-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 82C741C243F5 for ; Thu, 22 Feb 2024 11:55:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFA5B47A40; Thu, 22 Feb 2024 11:55:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lRDl0nHn" Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (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 1D9F145C08 for ; Thu, 22 Feb 2024 11:55:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708602934; cv=none; b=H9XHi9XdhhGRcUZBhs0MJIystG63QVylEiQ3ephbMbMYffmgptut4Unni5Jdk7Qtc5vXdIgMpWG+jcSyPCgZNL4b9OMa8GWvwzj9ydGj1rVgIYkmqeKL98JoygDPdGl5K383v8qAmH5dE3xeGYkIpneSyTXp/fs01WwzzY3E14I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708602934; c=relaxed/simple; bh=0CJpr26zan7TdkdLzjJcZGBNSSb45N51xiEhwd3+uaw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LM6tIQ3CVBDX7kKH3F3ov9rUIMU5QB+jPJjxzl5JjKBbOs2By2xZq+0VkbR+9dykOSsg8vbBWjqRu90TRGl/Xo11LIdPn6l/15a4jttONJShBD6nAQZz1GVSAa8isXbXweHSEFCwUcPPt8LM5bPGhEVLziTD2i2qTk/81GAWRLk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=lRDl0nHn; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Thu, 22 Feb 2024 06:55:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708602930; 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: in-reply-to:in-reply-to:references:references; bh=ZOSNF//i8qwwUlDAqBjDcUQ68DsRV1xIVPVD8Mb3zPM=; b=lRDl0nHnJJsSXURYD+j4aDEP5upGN1kgw5NWTCfYi+JVsZEyXn78qm2NmO8/+ePcYaOOIB XlFrD8tQcHtTeRssf1+3QzUcCWLKu1/iNUq03e3Ehdu/wB04e1Htiua1y9wVPWYvuE1znI gkxm21v3AaWlXjatwcNzTsKJaHhyumk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Jan Kara Cc: Miklos Szeredi , Josef Bacik , linux-kernel@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, lsf-pc@lists.linux-foundation.org, linux-btrfs@vger.kernel.org Subject: Re: [Lsf-pc] [LSF TOPIC] statx extensions for subvol/snapshot filesystems & more Message-ID: <2tsfxaf2blhcxlkfcagfavz3mnuga3qsjgpytbstvykmcq2prj@icc7vub55i3p> References: <2uvhm6gweyl7iyyp2xpfryvcu2g3padagaeqcbiavjyiis6prl@yjm725bizncq> <20240221210811.GA1161565@perftesting> <20240222110138.ckai4sxiin3a74ku@quack3> <20240222114417.wpcdkgsed7wklv3h@quack3> 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: <20240222114417.wpcdkgsed7wklv3h@quack3> X-Migadu-Flow: FLOW_OUT On Thu, Feb 22, 2024 at 12:44:17PM +0100, Jan Kara wrote: > On Thu 22-02-24 06:27:14, Kent Overstreet wrote: > > On Thu, Feb 22, 2024 at 12:01:38PM +0100, Jan Kara wrote: > > > On Thu 22-02-24 04:42:07, Kent Overstreet wrote: > > > > On Thu, Feb 22, 2024 at 10:14:20AM +0100, Miklos Szeredi wrote: > > > > > On Wed, 21 Feb 2024 at 22:08, Josef Bacik wrote: > > > > > > > > > > > > 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. > > > > > > > > > > Overlayfs tries hard not to use st_dev to give uniqueness and instead > > > > > partitions the 64bit st_ino space within the same st_dev. There are > > > > > various fallback cases, some involve switching st_dev and some using > > > > > non-persistent st_ino. > > > > > > > > Yeah no, you can't crap multiple 64 bit inode number spaces into 64 > > > > bits: pigeonhole principle. > > > > > > > > We need something better than "hacks". > > > > > > I agree we should have a better long-term plan than finding ways how to > > > cram things into 64-bits inos. However I don't see a realistic short-term > > > solution other than that. > > > > > > To explicit: Currently, tar and patch and very likely other less well-known > > > tools are broken on bcachefs due to non-unique inode numbers. If you want > > > ot fix them, either you find ways how bcachefs can cram things into 64-bit > > > ino_t or you go and modify these tools (or prod maintainers or whatever) to > > > not depend on ino_t for uniqueness. The application side of things isn't > > > going to magically fix itself by us telling "bad luck, ino_t isn't unique > > > anymore". > > > > My intent is to make a real effort towards getting better interfaces > > going, prod those maintainers, _then_ look at adding those hacks (that > > will necessarily be short term solutions since 64 bits is already > > looking cramped). > > OK, fine by me :) So one thing is still not quite clear to me - how do you > expect the INO_NOT_UNIQUE flag to be used by these apps? Do you expect them > to use st_dev + st_ino by default and fall back to fsid + fhandle only when > INO_NOT_UNIQUE is set? Shouldn't matter. If they care about performance and they're in some strange situation where the syscal overhead matters, they can use fhandle only when the bit is set, but I'd personally prefer to see everyone on the same codepath and just always using fh.