RE: [PATCH] eventfs: Have inodes have unique inode numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Linus Torvalds
> Sent: 26 January 2024 21:36
> 
> 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.
> 
> So why is it ten lines instead of one?

Doesn't Linux support 64bit inode numbers?
They solve the wrap problem...

I also don't know what filesystems like NTFS use - they don't have
the concept of inode.

IIRC NFS used to use the inode number for its 'file handle'.
Rather a pain when trying to write code to export a layered FS
(especially if a layer might be an NFS mount!).

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux