Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2605223rdb; Wed, 21 Feb 2024 13:05:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUygLNF++0fzaGNbQv1SxgJZidbXayXeySBFnDhwBt2bagTiOV4EGyVxi+6vIC4RzRFiyPAXhE5+672/rXKhhWfWz8aVGbcooIEuCbDwA== X-Google-Smtp-Source: AGHT+IEmt4RehQkqp1d/DFhzd8gms7Qy32TXbqwrkgxPf3tNDfMRBCyi9X/ikSuBBJdWVQA//uUZ X-Received: by 2002:a17:902:6e0f:b0:1d9:167b:8e6c with SMTP id u15-20020a1709026e0f00b001d9167b8e6cmr17700594plk.46.1708549529982; Wed, 21 Feb 2024 13:05:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708549529; cv=pass; d=google.com; s=arc-20160816; b=0EiIS66vcEfIfXkBnFxcJhB4orSTL7tI9ZyQOsRbd5AjBgUN7paqt3fxp5UarWw405 F4bNXoBLo+8lQrncnVgsNEZyhy5cpqDEl3i/gEj/5yHX1NsGy3ew9aPplWLNHBAGRSaz OqtK9+mZ0hRpDUVIiUHs4uo3M/NGBUqLfMRcxJMH81UIFHJYg159NcHu6xj8SolEdsFA ki8JB/emA5QknPdLFiayIpRn/rU3lDFkP+JAX0rvNnbTnCpvpRuOwmbFJe3eIS8gBpmk p1xDwGzQJi+YWBgKcICIh6Hlz7LQyrYcTLnfy/+qBzGB8cBk7dRNDpr8QZkbjFQ5+W+c 8YTw== 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=sTsivf6BMqQt+BMiZsHRmWuFS0uMyL6NGhUqEyvJOuc=; fh=x//vHdM8u5QOJrPTqqUpbdk/rzZU5ovNS8aQ1I2HlH4=; b=vxjormRNpaRM6CGk4z7npvNtzwtc0+cuQUsxDwHnhv9DDEjHUAQ9FrZKDtiTzE9hWH AyNlBAkfcWE0waIGq9qlkBUVONPkmZX0IFpkdriIkFCX52hGoQYLCqLbk5L4NPsnv5Oq dX9GBr4aN5acEzOUVs6DgyNxSXF8qlSuEUp4oyBYA98QAXiB4GWaSwJmrFqNYpjeZHxE 60ivUa84Z64kcW21r8zYDWDdNGuZVbfWoSzuuNzPi0kUq0n9/NdP52unI1lnZCgpBQWi TCI1WX/TMhu0weLU9WQhzu3O3aFrIOiOYAUNibNIOCNu+W0jLmalr8VRMpwDynWRyHJs TAyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GN1UAiLa; 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-75490-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75490-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id cp9-20020a170902e78900b001dbfbf0c7f2si5530514plb.539.2024.02.21.13.05.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 13:05:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75490-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GN1UAiLa; 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-75490-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75490-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D28B62847EF for ; Wed, 21 Feb 2024 21:05:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13800126F1D; Wed, 21 Feb 2024 21:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="GN1UAiLa" Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (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 8915586637 for ; Wed, 21 Feb 2024 21:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708549508; cv=none; b=Gr92ZpiivgYrEbNAjJJ6NFOsybPMvYN8dZoARVJUw+QzbpPpC0wCn6txbvPtg8sjTGit4yas5S0KzyqLA/oifYXrB1+NTDqm1HuyH73v+W9VkxYz60VLIkwzjTzN6GY3MnWY+t41A9msdPeo5G3eQaL4Ewc5qbuTFWtneI5kaHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708549508; c=relaxed/simple; bh=43K2olQjRDLoK2JMYHwSGAyFBao6TRTJN3RH0Z7TSso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dpk5NBZccV3DYtac70B3eqGmt2pYKH9pNlfR/vEiH0LDDoRL7oUeFwhlOeXjNkWQ0paJyG5pOIkr1YWwifg7moqAtG71d+gucSM0lyECEEWKkSh5SVinvf+Bp6WO3Pj4Ym5RqtUfo3eyQ7ZITJQzzOIgQLwuoDftHXIjRmfQpfA= 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=GN1UAiLa; arc=none smtp.client-ip=95.215.58.181 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: Wed, 21 Feb 2024 16:04:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708549504; 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=sTsivf6BMqQt+BMiZsHRmWuFS0uMyL6NGhUqEyvJOuc=; b=GN1UAiLazx0hAHCknbnw+5J5Jk4KgDCGiMBtjacLlmDCfCDnypK0OiNv0O54sjDEFM5cDr Owr9egG5ffC6VA2iPwiYqkMRQMHQENEgUoGGmJQSMXAeDpv/iI8/f6RUH2jXdW1/yZ+gqg +dXYq/BJcaIgLAfpcT1URpK4q5B5Fvg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Miklos Szeredi Cc: 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, NeilBrown Subject: Re: [LSF TOPIC] statx extensions for subvol/snapshot filesystems & more Message-ID: 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: X-Migadu-Flow: FLOW_OUT 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." > > 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. Even POSIX must bend when faced with reality. 64 bits is getting uncomfortably cramped already and with filesystems getting bigger it's going to break sooner or later. We don't want to be abusing st_dev, and snapshots and inode number sharding mean we're basically out of bits today. > doing (see documentation) is generally the right direction. It makes > various compromises but not to uniqueness, and we haven't had > complaints (fingers crossed). I haven't seen anything in overlayfs that looked like a real solution, just hacks that would break sooner or later if more filesystems are being stacked. > 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. If we define it, it has a perfectly well defined meaning. I wouldn't be against telling userspace to use file handles unconditionally; they should only need to query it for a file that has handlinks, anyways. But I think we _do_ need this bit, if nothing else, as exactly that nudge.