From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DC8E924A02; Fri, 26 Jan 2024 21:42:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706305329; cv=none; b=d9CEXaXKag5CxuGiOFyEWFOtLOrTkcbo0Ds+0u4PqfDmIaONG+ghKUy4HJsLcwic6Z6NrIzwId6YlAljNmaS237H45JsgI+bkKn+KKLEYFVuYBjulKCMKloeLhTDPyDm+EvsGskdzVTcin4SgD0FsdPAr117qhXTxw41LrKFk2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706305329; c=relaxed/simple; bh=M+qWWIk9HH5ZKtcGJLB0VA1tZ9Q0fzWbKtbJsBsOrBk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=coqye95NkaaJqbRaC0CeaOZnjBGvvW1iSal4mjXNRxWZ+N9iR8zJEUWXrpc1nCufKZZgSzqq3QUjANHbXzxNrIDxb/HLRZ0oKhNfk54LvsW/NgyX3koymCC2QEyXqkBQXpM9c/gvHR8FQkm3XRY90yzuL9O1QFxX+7AzYgSsYRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4EFBC433C7; Fri, 26 Jan 2024 21:42:07 +0000 (UTC) Date: Fri, 26 Jan 2024 16:42:06 -0500 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Linux Trace Devel , Masami Hiramatsu , Mathieu Desnoyers , Christian Brauner , Ajay Kaher , Geert Uytterhoeven , linux-fsdevel Subject: Re: [PATCH] eventfs: Have inodes have unique inode numbers Message-ID: <20240126164206.637ba8bd@rorschach.local.home> In-Reply-To: References: <20240126150209.367ff402@gandalf.local.home> <20240126162626.31d90da9@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Fri, 26 Jan 2024 13:36:20 -0800 Linus Torvalds wrote: > On Fri, 26 Jan 2024 at 13:26, Steven Rostedt wrote: > > > > I'd be happy to change that patch to what I originally did before deciding > > to copy get_next_ino(): > > > > unsigned int tracefs_get_next_ino(int files) > > { > > static atomic_t next_inode; > > unsigned int res; > > > > do { > > res = atomic_add_return(files + 1, &next_inode); > > > > /* Check for overflow */ > > } while (unlikely(res < files + 1)); > > > > return res - files; > > Still entirely pointless. > > If you have more than 4 billion inodes, something is really really wrong. No, but you can trivially make a loop that creates and destroys directories that will eventually overflow the count. -- Steve