Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp902542rdb; Fri, 26 Jan 2024 14:50:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgaOMVedMqtVUSFz13e+FuoC+nQ1GymsjakuAoT/UBbUjCHsaM44C1k3DWK3LUB2YW0cbM X-Received: by 2002:a17:90a:f0c8:b0:290:3e62:93fe with SMTP id fa8-20020a17090af0c800b002903e6293femr639584pjb.7.1706309424332; Fri, 26 Jan 2024 14:50:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706309424; cv=pass; d=google.com; s=arc-20160816; b=ecOGx6RQ73z0tdiFMT2ZoLNlGBMgOICy0Y5LGKYs5LPIKAp4hQzPfKz6jfmnt6ikhB xZ5x+BDu/vrihBru1gVF6i4KgVV9j5TvE0jta/Pr34ZitgYKzLNltORZYQcAfxwlqFRv M1XkIp6rNT91VhY8MTjhVyvHHGnwvECrhcl8W4BnN5VFuBp+PMMSgwovmSngVNJ7VKSO UAsKbiDpemLIyFTyq/lQj8xBetAgq8zzBJPC1bJViG8bz7RhxR5Aoz6Ll8vkxs0DUFpe KqIcpassjQGY+HW32CtcYvIwnyZmWGB0kFmxemuMNwa1hx4UsnJma4azYCs3167E4kki iMJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=xrhM++a5OFTukQjh6bVd0EodL17OqMY2SHvdwAgkV3I=; fh=BUWDLBPTUg+oym7buuPfMDkLp4pmTXXUM6wRhLxUGhE=; b=LKWUTyXFOdkIcWx2vDnbgu6x+dI+LQc90rDICyZ3QC2k7+e194Yv18ABdScqTob+yo FZCRuFs13NQz6D30yi62O8agZQyY4qwYndr3h1QQE3UQfY2fzFKxr/NDsrpdquIzWhUS 1nYJ/ZFC3yL7YN1Em1q3Z3tlY0Dj3qopE8Lah68UDcx9TstYc2V8za0FV8yRtUtY01Iu xR5Et8LBTLuHTDj5+J/mSdToPWJYT/U67Lfv+9SdHpJoQDcCbqF7BJoIzgIyle0wmlqX Lh+Vl96iJHpNixuZ3MUSWeAzL+iGF6qYYc+5S/nvsbMK50k359xRLTECI+HJ+wTIx/5e kbWA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MScHVDiX; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-40796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40796-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x3-20020a17090a1f8300b002909282f114si1832592pja.108.2024.01.26.14.50.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 14:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MScHVDiX; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-40796-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40796-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E1663B227BC for ; Fri, 26 Jan 2024 22:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27EAA250F8; Fri, 26 Jan 2024 22:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="MScHVDiX" Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 97124250F9 for ; Fri, 26 Jan 2024 22:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706309347; cv=none; b=gWzlEfaiJZoclqsLmPy/d5KQ6OoRUA4WVu0e2kus0avM+QMoBC/5KCd6vbWdWwk7t/dI+qDZF9wLaM4emqWWgX+AV7MN92NXIp6HcBxY/RFjiphCZ6Elq4Rd3pBKXqishIWoEfPAg3I+hPCOlcOmoH1aeaprNTWkIrJjJudH8yw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706309347; c=relaxed/simple; bh=ZC8lIw6nkj5AkxyuI4xf/CiVElrJVya/QfDBrLgEqn0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AoVRQies9nDKt/jzFu0AFrFXjeSXdtWfPt6ScZsKM+JHvXs3UiLjuuKXbXMCyiLa314qCfnWEoFYVvDoj3Rm4aTvQ09v0dl6UuIThIkSxJlGhzXJ9MIwsQYlrV/OsCdNTW1eBIf7il6D229L+nnHfL6WpQCFS3FwPjBlhYZ7HUM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=MScHVDiX; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2cddb2c2b54so8763841fa.1 for ; Fri, 26 Jan 2024 14:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1706309343; x=1706914143; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xrhM++a5OFTukQjh6bVd0EodL17OqMY2SHvdwAgkV3I=; b=MScHVDiXM6oJ5JNU8P5D4csBM5lGEIPpPeJmXOcjVXbk+A/RrE7R9PFN9l8tR9Vx4B HVZFCO0Ui/Rf8VDrgg0Do+wsmppw6CtG0caw9sUdZwk8aQ4uoo3CxTxcGi/+1YEM7nK1 Yjnpl1WWTrNMga7ZlyQPDjV0f7wiP0mJhMpAg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706309343; x=1706914143; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xrhM++a5OFTukQjh6bVd0EodL17OqMY2SHvdwAgkV3I=; b=RwW/fb0N9Xrjnr7NvDe1yugbgRqtIPBsO/m9vQqFmvWMgflzSVmAnmgc8Avq5dhhGO V9VDf2Wp/75gayxQc02IfnvgJrvrIGJQRt8z3HmmF2/fxV2oglpkN2tMiPPCcEz4J++5 hczmLN7bhCYG1zmj5tfAD6d8HDmVvg01/3BycbQVCZ+irM7sTU93fGmcbox3CX8l9dCe xYRaq79enorhlzyh2LF2TuXOIqPeLBAvRXZByavX7BpfEyEwkfBjn1dj+7KxkmYYJWGp lj/VKCIuQ4hscv3emRhZ3AJrpsKeY3tWknd142d4KwoJTkxjgXfQtOOcvhKkr45zYFTP /2hQ== X-Gm-Message-State: AOJu0Yxluxgt+ueeaqJXs1tRb0uthJSjqquoqlyuOZ1d1Fj3CpmL6q/0 dQKQls4b4puz9djbxbKdwB4zjdbn/Wame/C1E42qCONroEylo3eoirJ/94r/2tC170l0FBhiA1j uRK4VXA== X-Received: by 2002:a05:651c:1550:b0:2cf:2a3e:d1aa with SMTP id y16-20020a05651c155000b002cf2a3ed1aamr748835ljp.49.1706309343357; Fri, 26 Jan 2024 14:49:03 -0800 (PST) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com. [209.85.208.53]) by smtp.gmail.com with ESMTPSA id vi1-20020a170907d40100b00a35168a5cdesm558870ejc.108.2024.01.26.14.49.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jan 2024 14:49:02 -0800 (PST) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-55a45a453eeso1674964a12.0 for ; Fri, 26 Jan 2024 14:49:02 -0800 (PST) X-Received: by 2002:a05:6402:2709:b0:55d:31f8:920a with SMTP id y9-20020a056402270900b0055d31f8920amr513622edd.27.1706309342198; Fri, 26 Jan 2024 14:49:02 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240126150209.367ff402@gandalf.local.home> <20240126162626.31d90da9@gandalf.local.home> <8547159a-0b28-4d75-af02-47fc450785fa@efficios.com> In-Reply-To: From: Linus Torvalds Date: Fri, 26 Jan 2024 14:48:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] eventfs: Have inodes have unique inode numbers To: Matthew Wilcox Cc: Mathieu Desnoyers , Steven Rostedt , LKML , Linux Trace Devel , Masami Hiramatsu , Christian Brauner , Ajay Kaher , Geert Uytterhoeven , linux-fsdevel Content-Type: text/plain; charset="UTF-8" On Fri, 26 Jan 2024 at 14:34, Matthew Wilcox wrote: > > On Fri, Jan 26, 2024 at 05:14:12PM -0500, Mathieu Desnoyers wrote: > > I would suggest this straightforward solution to this: > > > > a) define a EVENTFS_MAX_INODES (e.g. 4096 * 8), > > > > b) keep track of inode allocation in a bitmap (within a single page), > > > > c) disallow allocating more than "EVENTFS_MAX_INODES" in eventfs. > > ... reinventing the IDA? Guysm, this is a random number that is *so* interesting that I seriously think we shouldn't have it at all. End result: nobody should care. Even the general VFS layer doesn't care. It literally avoids inode number zero, not because it would be a bad inode number, but simply because of some random historical oddity. In fact, I don't think we even have a reason for it. We have a commit 2adc376c5519 ("vfs: avoid creation of inode number 0 in get_next_ino") and that one calls out glibc for not deleting them. That makes no sense to me, but whatever. But note how the generic function does *not* try to make them unique, for example. They are just "unique enough". The generic function *does* care about being scalable in an SMP environment. To a disturbing degree. Oh well. Linus