Re: [PATCH] eventfs: Have inodes have unique inode numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] eventfs: Have inodes have unique inode numbers
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Fri, 26 Jan 2024 16:42:06 -0500
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, Linux Trace Devel <linux-trace-devel@xxxxxxxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>
- In-reply-to: <CAHk-=wj8WygQNgoHerp-aKyCwFxHeyKMguQszVKyJfi-=Yfadw@mail.gmail.com>
- References: <20240126150209.367ff402@gandalf.local.home> <CAHk-=wgZEHwFRgp2Q8_-OtpCtobbuFPBmPTZ68qN3MitU-ub=Q@mail.gmail.com> <20240126162626.31d90da9@gandalf.local.home> <CAHk-=wj8WygQNgoHerp-aKyCwFxHeyKMguQszVKyJfi-=Yfadw@mail.gmail.com>
On Fri, 26 Jan 2024 13:36:20 -0800
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 26 Jan 2024 at 13:26, Steven Rostedt <rostedt@xxxxxxxxxxx> 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
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]