Re: [RFC 01/12] common/preamble: Fix fsx for ext4 with bigalloc

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



On Fri, Jun 13, 2025 at 08:04:46AM -0700, Darrick J. Wong wrote:
> On Fri, Jun 13, 2025 at 11:01:25AM +0530, Ojaswin Mujoo wrote:
> > On Thu, Jun 12, 2025 at 07:36:14AM -0700, Darrick J. Wong wrote:
> > > On Thu, Jun 12, 2025 at 11:41:16AM +0530, Ojaswin Mujoo wrote:
> > > > On Wed, Jun 11, 2025 at 07:30:05AM -0700, Darrick J. Wong wrote:
> > > > > On Wed, Jun 11, 2025 at 03:04:44PM +0530, Ojaswin Mujoo wrote:
> > > > > > From: "Ritesh Harjani (IBM)" <ritesh.list@xxxxxxxxx>
> > > > > > 
> > > > > > Insert range and collapse range only works with bigalloc in case
> > > > > > the range is cluster size aligned, which fsx doesnt take care. To
> > > > > > work past this, disable insert range and collapse range on ext4, if
> > > > > > bigalloc is enabled.
> > > > > 
> > > > > Hmmm, insert/collapse-range have the same behavior on xfs realtime,
> > > > > maybe we should amend test() in fsx to round to the allocation unit
> > > > > size?
> > > > Hey Darrick,
> > > > 
> > > > Yes makes sense but as you mentioned, I'm not sure if there
> > > > is a way to programatically detect the bigalloc cluster size (or
> > > > allocation unit in general) like we do for xfs. 
> > > 
> > > I don't either, but maybe we should have a way reveal the allocation
> > > unit size for a given file?  Yet another statx field? :P
> > > 
> > > (It /would/ be useful for programs that use collapse/insert range)
> > 
> > Yes it would, at the very least, help with defining clear semantics for
> > collapse/insert range with bigalloc/rtvol because right now those
> > operations just EINVAL if the range is not aligned correctly, which is
> > confusing since it is not documented how to do it properly.
> > 
> > xfs does have an ioctl to get the geometry for rtvol. I think you are
> > suggesting a more generic statx field which can be used by other FSes as
> > well, right?
> 
> Right, since other filesystems (fat, ntfs, etc) also have allocation
> units larger than the fsblock size.  Most of the time the allocunit
> amplification simply doesn't matter to applications, but once in a while
> it does (collapse/insert range, cow) affect performance.
> 
> --D

Makes sense Darrick. I can look into it. 

For this patch, is it okay to keep the approach of disabling
collapse/insert range for bigalloc for now and we can change fsx later
if we add support for exposing alloc units.

Regards,
Ojaswin




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux