public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* Running out of inode flags in ext4
@ 2024-02-05 10:08 Ojaswin Mujoo
  2024-02-05 16:32 ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Ojaswin Mujoo @ 2024-02-05 10:08 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4, linux-kernel, jack, ritesh.list, john.g.garry, djwong

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).

Some ideas that I have:

- I see that 0x00400000 (formerly EXT4_EOFBLOCKS_FL) is free to use but
	as per my understanding, this is interpreted in some way by older fsck
	versions. However, marking atomic writes as RO_COMPAT might help aavoid
	confusion in fsck.

- If we can't use inode flags, should we maybe use xattr to store
	atomic_write details?
	
Should I go with either of above or is there a better way to mark
ext4 inodes which I might be missing. Also, now that we are out of inode
flags, what's the recommended way to handle such use cases in the
future?

Would appreciate some suggestions on this.

Thanks,
ojaswin

[1]
https://lore.kernel.org/all/20240124142645.9334-4-john.g.garry@oracle.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-06  5:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 10:08 Running out of inode flags in ext4 Ojaswin Mujoo
2024-02-05 16:32 ` Theodore Ts'o
2024-02-06  5:13   ` Ojaswin Mujoo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox