linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] extsize and forcealign design in filesystems for atomic writes
@ 2025-01-29  7:06 Ojaswin Mujoo
  2025-01-29  8:59 ` John Garry
  2025-03-23  7:00 ` [RFCv1 0/1] EXT4 support of multi-fsblock atomic write with bigalloc Ritesh Harjani (IBM)
  0 siblings, 2 replies; 15+ messages in thread
From: Ojaswin Mujoo @ 2025-01-29  7:06 UTC (permalink / raw)
  To: lsf-pc
  Cc: linux-xfs, linux-fsdevel, John Garry, djwong, dchinner, hch,
	ritesh.list, jack, tytso, linux-ext4

Greetings,

I would like to submit a proposal to discuss the design of extsize and
forcealign and various open questions around it.

 ** Background **

Modern NVMe/SCSI disks with atomic write capabilities can allow writes to a
multi-KB range on disk to go atomically. This feature has a wide variety of use
cases especially for databases like mysql and postgres that can leverage atomic
writes to gain significant performance. However, in order to enable atomic
writes on Linux, the underlying disk may have some size and alignment
constraints that the upper layers like filesystems should follow. extsize with
forcealign is one of the ways filesystems can make sure the IO submitted to the
disk adheres to the atomic writes constraints.

extsize is a hint to the FS to allocate extents at a certian logical alignment
and size. forcealign builds on this by forcing the allocator to enforce the
alignment guarantees for physical blocks as well, which is essential for atomic
writes.

 ** Points of discussion **

Extsize hints feature is already supported by XFS [1] with forcealign still
under development and discussion [2]. After taking a look at ext4's multi-block
allocator design, supporting extsize with forcealign can be done in ext4 as
well. There is a RFC proposed which adds support for extsize hints feature in
ext4 [3]. However there are some caveats and deviations from XFS design. With
these in mind, I would like to propose LSFMM topic on:

 * exact semantics of extsize w/ forcealign which can bring a consistent
   interface among ext4 and xfs and possibly any other FS that plans to
   implement them in the future.

 * Documenting how forcealign with extsize should behave with various FS
   operations like fallocate, truncate, punch hole, insert/collapse range etc 

 * Implementing extsize with delayed allocation and the challenges there.

 * Discussing tooling support of forcealign like how are we planning to maintain
   block alignment gurantees during fsck, resize and other times where we might
   need to move blocks around?

 * Documenting any areas where FSes might differ in their implementations of the
   same. Example, ext4 doesn't plan to support non power of 2 extsizes whereas
   XFS has support for that.

Hopefully this discussion will be relevant in defining consistent semantics for
extsize hints and forcealign which might as well come useful for other FS
developers too.

Thoughts and suggestions are welcome.

References:
[1] https://man7.org/linux/man-pages/man2/ioctl_xfs_fsgetxattr.2.html
[2] https://lore.kernel.org/linux-xfs/20240813163638.3751939-1-john.g.garry@oracle.com/
[3] https://lore.kernel.org/linux-ext4/cover.1733901374.git.ojaswin@linux.ibm.com/

Regards,
ojaswin

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

end of thread, other threads:[~2025-03-25 11:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29  7:06 [LSF/MM/BPF TOPIC] extsize and forcealign design in filesystems for atomic writes Ojaswin Mujoo
2025-01-29  8:59 ` John Garry
2025-01-29 16:06   ` Ojaswin Mujoo
2025-01-30 14:08     ` John Garry
2025-02-01  7:12       ` Ojaswin Mujoo
2025-02-04 12:20         ` John Garry
2025-02-04 20:12           ` Dave Chinner
2025-02-07  6:08           ` Ojaswin Mujoo
2025-02-07 12:01             ` John Garry
2025-02-08 17:05               ` Ojaswin Mujoo
2025-03-23  7:00 ` [RFCv1 0/1] EXT4 support of multi-fsblock atomic write with bigalloc Ritesh Harjani (IBM)
2025-03-23  7:00   ` [RFCv1 1/1] ext4: Add multi-fsblock atomic write support " Ritesh Harjani (IBM)
2025-03-23  7:02     ` Ritesh Harjani (IBM)
2025-03-25 11:42       ` Ojaswin Mujoo
2025-03-23  7:02   ` [RFCv1 0/1] EXT4 support of multi-fsblock atomic write " Ritesh Harjani (IBM)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).