lkml.org 
[lkml]   [2024]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] eventfs: Have inodes have unique inode numbers
On Fri, 26 Jan 2024 13:36:20 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Fri, 26 Jan 2024 at 13:26, Steven Rostedt <rostedt@goodmis.org> 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

\
 
 \ /
  Last update: 2024-05-27 14:35    [W:0.271 / U:2.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site