Re: Running out of inode flags in ext4

From: Ojaswin Mujoo
Date: Tue Feb 06 2024 - 00:16:19 EST


On Mon, Feb 05, 2024 at 11:32:49AM -0500, Theodore Ts'o wrote:
> On Mon, Feb 05, 2024 at 03:38:54PM +0530, Ojaswin Mujoo wrote:
> > Hi folks,
> >
> > I'm trying to rework the ext4 atomic write patchset so we have similar
> > semantics as discussed here [1], which would look something like:
> >
> > 1. we call FS_IOC_FSSETXATTR to enable atomic write on inode
> >
> > 2. In the setxattr path, we need to mark the inode with
> > atomic_write_enabled. XFS does it via an on disk inode flag which is
> > straightforward enough
> >
> > However, on ext4 we are almost out of 32 bits of inode flags and I don't
> > think it's possible to add any flags2 field or something (iiuc, ondisk
> > indoe doesn't have scope for expansion).
>
> We still have some unused flags. For example,
> 0x01000000. 0x04000000. and 0x08000000 are still unused. We are
> starting to get close to full, so we need to be a bit careful since it
> is very much a limited resource. But we're not yet at the point where
> we need to worry about trying to reuse flags like EXT4_EOFBLOCKS_FL.
Hi Ted,

Thats true, i don't even know how I missed that :) Sorry for the noise.

Regards,
ojaswin
>
> Cheers,
>
> - Ted