Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp900260rdb; Fri, 26 Jan 2024 14:44:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IH5jBDOy6N9M+QNg4Kt6xftOL3aamiCp3oay8QqyoRlFCD2q6z20iyKH5hMBNMCWozWnHDD X-Received: by 2002:aca:d06:0:b0:3bd:cf03:233a with SMTP id 6-20020aca0d06000000b003bdcf03233amr476974oin.75.1706309045377; Fri, 26 Jan 2024 14:44:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706309045; cv=pass; d=google.com; s=arc-20160816; b=fMwlqLXtnn8ezLiBsn/AUi28vEuo7ODPKMBcp5y1SVlyhJE/uGDNLD4f85rAKqTnKx ZRvfBr03NNo3L3WIYI72bVXN88rPc/aIftXHDWpvrjYMPgRdf1s9mzvL0kwpRquNMWpF +dhR8ljP3f3lkZq2z4e/OiNbrb/WCi4x3gu63pcg7xU4VCdChV+zt5dO28RHYxG9fHyk aT9eaY1boWIQCxWNN1iRluKVmdN3K5W3rBZbdi5CplLA0yQVI0ecxr2v22Y1wZVz6kg0 Ws/fExxNyxYVxWF0CHQfdOPbM5JySsrysdTBzPw7NLr3WkTUUOv/9XPOf7FtkxBpqS5/ 56iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ubob7bg2lIFYigJXo8EL+sR1TVXLHow0mTEJd6ELht0=; fh=efaTeW+SDFgGv6jJiPoumguo5JeD3uSOw74q4uHxKBo=; b=WSUhwAA0TyzxP0OdbtrKcOM6nJPoAZeR/yQzLmaXPPlqX2LslNf1D9hFFMLCnENn2y jYcYTTbSoawXncq5N9IXPKk5VaTa0Ze0BKujqfG3xMEnU2JA17kstk1tgixm7Op1Vrrk Q9HWQKz0Ao1ngjlSyf5ooLbgGCKxwvTnKkLdFHOnvZEfmcYJHPGZ05W1tsJuJBD6ahpn 7bWxpejEzJsqb3XQzqzMaRrO1b/7bY7e0iwEDtYU64exXlvY2clPYSB/9/9M6TrG87Rg mfWupVTuZPYNrnidr6nvAZKy6PzrolJRWmhKQHvG7w14SBLe0om60tYXmwyeEQWK3YEA LbtQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=Ysu05diR; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-40795-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40795-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fn16-20020a056a002fd000b006ddc82d274asi1818716pfb.187.2024.01.26.14.44.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 14:44:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40795-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=@efficios.com header.s=smtpout1 header.b=Ysu05diR; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-40795-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40795-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com 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 4E64B2886C9 for ; Fri, 26 Jan 2024 22:43:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88911249E3; Fri, 26 Jan 2024 22:41:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="Ysu05diR" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (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 692C91DA2E; Fri, 26 Jan 2024 22:41:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706308868; cv=none; b=IjywPTllqpFGi+fH0I4lrPOSF/eR0rJMPcjaiImCzo2HBMbxxwFbEjXLanBkYuMt/8Ega68IpiYDdZBv2ZxsoN0iYYQzJaEREPPkkzpFKD01/7RZfacE9w02AuPqcakFI9o44MKCQEcezJb3IT6oWuNQQ9Am7/KZBOjIxXf6tsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706308868; c=relaxed/simple; bh=QD1uun/DHxhpFTTJ8gigtXcRCDDv24VnfNEFqI2ZKHw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TkHaqJSQVYrjqgcqxbyBzSRqH1O2Zp11JJd85pxxB6gDT/AAd3PbSXcK4dwMMbTWKK8/D2mtMR68AwVs0FZIeJ/Qq+a5h79IxddV5cV1vpsqhRKrzPs3DtDnX3bE6piCBzd3yCTq37A2cYMxRnv4MhUE8LIddqC+u14CFGyPSBg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=Ysu05diR; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706308865; bh=QD1uun/DHxhpFTTJ8gigtXcRCDDv24VnfNEFqI2ZKHw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ysu05diRuwrrgUeNFwZvMuIPU/ttjsd2HGydFAYM4fF3L/dKakJ5G1Lx1cSqY0+bX PLuhGj+esMRK19Z8JvjXOG0PABcLVcbTj6jDDh7g73PTtT/5woQn2oGRwPCYNAqsZF vuSMR+Toru5lAtM4bsT4/vDr0zhg81Ypiyeu2oUvw5fi/t8A77s93fGEAvWJUnaM/4 EJ9yzUfFjO+JR0iwXL7uBP8FbvdiqpUB2QAijZlLcI0NmJ5I4mfMfHurCSmS2p1vKl EQHhInXZPUKVByupjLc/r75hp6vn4PsLcmcYKbK+bXoJTeZI/yu+bO0EUUpTlN78JQ cHVQdWQUA648w== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TMCN12vytzVQ6; Fri, 26 Jan 2024 17:41:05 -0500 (EST) Message-ID: <29be300d-00c4-4759-b614-2523864c074b@efficios.com> Date: Fri, 26 Jan 2024 17:41:05 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] eventfs: Have inodes have unique inode numbers Content-Language: en-US To: Linus Torvalds Cc: Steven Rostedt , LKML , Linux Trace Devel , Masami Hiramatsu , Christian Brauner , Ajay Kaher , Geert Uytterhoeven , linux-fsdevel References: <20240126150209.367ff402@gandalf.local.home> <20240126162626.31d90da9@gandalf.local.home> <8547159a-0b28-4d75-af02-47fc450785fa@efficios.com> From: Mathieu Desnoyers In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-01-26 17:29, Linus Torvalds wrote: > On Fri, 26 Jan 2024 at 14:14, Mathieu Desnoyers > wrote: >> >> I do however have a concern with the approach of using the same >> inode number for various files on the same filesystem: AFAIU it >> breaks userspace ABI expectations. > > Virtual filesystems have always done that in various ways. > > Look at the whole discussion about the size of the file. Then look at /proc. Yes, there is even a note about stat.st_size in inode(7) explaining this: NOTES For pseudofiles that are autogenerated by the kernel, the file size (stat.st_size; statx.stx_size) reported by the kernel is not accurate. For example, the value 0 is returned for many files under the /proc di‐ rectory, while various files under /sys report a size of 4096 bytes, even though the file content is smaller. For such files, one should simply try to read as many bytes as possible (and append '\0' to the returned buffer if it is to be interpreted as a string). But having a pseudo-filesystem entirely consisting of duplicated inodes which are not hard links to the same file is something new/unexpected. > And honestly, eventfs needs to be simplified. It's a mess. It's less > of a mess than it used to be, but people should *NOT* think that it's > a real filesystem. I agree with simplifying it, but would rather not introduce userspace ABI regressions in the process, which will cause yet another kind of mess. > Don't use some POSIX standard as an expectation for things like /proc, > /sys or tracefs. If those filesystems choose to do things differently from POSIX, then it should be documented with the relevant ABIs, because userspace should be able to know (rather than guess) what it can expect. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com