The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW
@ 2026-11-21 15:47 Wayne Gao
  2026-11-23 11:44 ` John Garry
  2026-11-23 20:11 ` Dave Chinner
  0 siblings, 2 replies; 4+ messages in thread
From: Wayne Gao @ 2026-11-21 15:47 UTC (permalink / raw)
  To: cem@kernel.org
  Cc: linux-xfs@vger.kernel.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, Wayne Gao



Hardware-capable devices normally prefer hardware atomic writes, making
it difficult to exercise the software CoW path deterministically without
changing file layouts or affecting ordinary writes.

Add a non-debug force_atomic_cow sysfs control for each filesystem.
When enabled, route RWF_ATOMIC writes directly to the existing software
CoW path regardless of hardware eligibility. Keep automatic selection
as the default and reject enabling the control without software atomic
write support.

Sample the setting once per I/O so in-flight requests retain their
selected path. Preserve existing validation, completion and error
handling, and leave non-atomic writes unchanged.

Report no separate optimized atomic write limit while CoW is forced
and document the control's runtime scope and lifetime.

Validation: strict checkpatch passed. Linux kernel build and mounted-XFS
runtime tests have not been run.

Signed-off-by: Wayne Gao <wayne.gao1@solidigm.com>
---
Hi Carlos and XFS developers,

I would appreciate feedback on this proposed interface.

The intended use is a controlled comparison of hardware-backed and
software-backed RWF_ATOMIC writes on the same hardware, without having
to construct misaligned mappings to trigger fallback. The existing
DEBUG-only always_cow control also affects ordinary writes, which
changes the workload being compared.

In particular, I would welcome feedback on:

1. Whether a non-debug, per-filesystem sysfs control is appropriate,
   or whether another existing testing mechanism should be extended.

2. Whether reporting stx_atomic_write_unit_max_opt as zero while
   software CoW is forced is the right behavior.

3. The expected fstests coverage for this control. Intended coverage
   includes off/on/off transitions on hardware-eligible writes,
   per-filesystem isolation, unchanged non-atomic write routing,
   rejection without software atomic write support, and concurrent
   toggling with in-flight I/O.

Linux build, mounted-XFS testing and fstests coverage remain outstanding.
This RFC is primarily requesting interface and semantic feedback, and
does not make runtime performance claims.

Thanks,
Wayne

 Documentation/ABI/testing/sysfs-fs-xfs | 42 ++++++++++++++++++++++++++
 fs/xfs/xfs_file.c                      |  7 +++--
 fs/xfs/xfs_iops.c                      |  4 +++
 fs/xfs/xfs_mount.h                     |  1 +
 fs/xfs/xfs_sysfs.c                     | 33 ++++++++++++++++++++
 5 files changed, 84 insertions(+), 3 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-fs-xfs b/Documentation/ABI/testing/sysfs-fs-xfs
index 7da4de948..3d0c88df5 100644
--- a/Documentation/ABI/testing/sysfs-fs-xfs
+++ b/Documentation/ABI/testing/sysfs-fs-xfs
@@ -35,3 +35,45 @@ Description:
         outstanding transactions, including regrants due to
         rolling transactions in bytes.
 Users:         xfstests
+
+What:          /sys/fs/xfs/<disk>/force_atomic_cow
+Date:          November 2026
+Contact:       linux-xfs@vger.kernel.org
+Description:
+               Read-write boolean controlling the implementation of atomic
+               writes. The default is 0, which prefers hardware atomic writes
+               and falls back to software copy-on-write (CoW) when needed.
+               Setting this to 1 forces RWF_ATOMIC writes to use software CoW,
+               even when the request satisfies the hardware atomic write
+               limits. Writes without RWF_ATOMIC are unaffected.
+
+               This control is available without CONFIG_XFS_DEBUG and is
+               intended for testing and comparing the atomic write paths.
+               Enabling it requires software atomic write support (currently
+               the reflink feature); otherwise the write returns EOPNOTSUPP.
+               Invalid boolean input returns EINVAL. Failed updates leave
+               the setting unchanged.
+
+               The setting belongs to the filesystem instance and is shared
+               by all mounts of that instance, including bind mounts. Each
+               atomic write samples it once when selecting its I/O path.
+               Changing it affects subsequent path selections, including
+               writes through already open file descriptors, but does not
+               wait for or redirect I/O that has already selected a path.
+               Drain outstanding I/O before switching for comparisons that
+               require an unambiguous boundary between the two modes.
+
+               Existing atomic write size, alignment and direct I/O
+               requirements still apply. Forced CoW can fail for lack of
+               space even when overwriting allocated data, and RWF_NOWAIT
+               writes can return EAGAIN. Failures are not retried using
+               hardware atomic writes.
+
+               While enabled, statx reports stx_atomic_write_unit_max_opt
+               as 0, meaning that stx_atomic_write_unit_max is the optimized
+               limit, with no separate hardware-optimized size range. The
+               other atomic write limits are unchanged.
+
+               The setting survives remounts but is not stored on disk.
+               A newly mounted filesystem instance starts with it disabled.
+Users:         xfstests
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 8070a07e6..6f45b22e3 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -787,10 +787,11 @@ xfs_file_dio_write_atomic(
     const struct iomap_ops     *dops;

     /*
-        * HW offload should be faster, so try that first if it is already
-        * known that the write length is not too large.
+        * Prefer HW offload unless software CoW is forced or the write length
+        * exceeds the hardware limit.
      */
-       if (ocount > xfs_inode_buftarg(ip)->bt_awu_max)
+       if (READ_ONCE(ip->i_mount->m_force_atomic_cow) ||
+           ocount > xfs_inode_buftarg(ip)->bt_awu_max)
         dops = &xfs_atomic_write_cow_iomap_ops;
     else
         dops = &xfs_direct_write_iomap_ops;
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index a84a4c1c3..c1720b2c9 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -664,6 +664,10 @@ xfs_get_atomic_write_max_opt(
     const unsigned int hw_awu_max = xfs_inode_buftarg(ip)->bt_awu_max;
     const xfs_fsize_t  hw_align_max = xfs_get_atomic_hw_write_align(ip);

+       /* Forced software writes have no separate hardware-optimized limit. */
+       if (READ_ONCE(mp->m_force_atomic_cow))
+               return 0;
+
     /* if the max is 1x block, then just keep behaviour that opt is 0 */
     if (sw_awu_max <= mp->m_sb.sb_blocksize)
         return 0;
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index cbcfb89c6..71f574c21 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -239,6 +239,7 @@ typedef struct xfs_mount {
                         /* low free space thresholds */
     unsigned long              m_opstate;      /* dynamic state flags */
     bool                       m_always_cow;
+       bool                    m_force_atomic_cow;
     bool                       m_fail_unmount;
     bool                       m_finobt_nores; /* no per-AG finobt resv. */
     bool                       m_update_sb;    /* sb needs update in mount */
diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
index 4a6a8c92c..b8fead80e 100644
--- a/fs/xfs/xfs_sysfs.c
+++ b/fs/xfs/xfs_sysfs.c
@@ -67,7 +67,40 @@ static const struct sysfs_ops xfs_sysfs_ops = {
     .store = xfs_sysfs_object_store,
 };

+static inline struct xfs_mount *to_xfs_mount(struct kobject *kobj)
+{
+       return container_of(to_kobj(kobj), struct xfs_mount, m_kobj);
+}
+
+static ssize_t
+force_atomic_cow_store(struct kobject *kobject, const char *buf, size_t count)
+{
+       struct xfs_mount        *mp = to_xfs_mount(kobject);
+       bool            enable;
+       int             ret;
+
+       ret = kstrtobool(buf, &enable);
+       if (ret)
+               return ret;
+
+       if (enable && !xfs_can_sw_atomic_write(mp))
+               return -EOPNOTSUPP;
+
+       WRITE_ONCE(mp->m_force_atomic_cow, enable);
+       return count;
+}
+
+static ssize_t
+force_atomic_cow_show(struct kobject *kobject, char *buf)
+{
+       struct xfs_mount        *mp = to_xfs_mount(kobject);
+
+       return sysfs_emit(buf, "%d\n", READ_ONCE(mp->m_force_atomic_cow));
+}
+XFS_SYSFS_ATTR_RW(force_atomic_cow);
+
 static struct attribute *xfs_mp_attrs[] = {
+       ATTR_LIST(force_atomic_cow),
     NULL,
 };
 ATTRIBUTE_GROUPS(xfs_mp);

base-commit: 5e7b6fe39324913f6416c854c6ed3a1793aaba8e
--
2.54.0.windows.1

Wayne Gao
Principle Storage Solution Architect
wechat: 13636331364
solidigm.com



CONFIDENTIALITY NOTICE: This email and any files attached may contain confidential information and may be restricted from disclosure by corporate confidentiality guidelines, or applicable state and federal law. It is intended solely for the use of the person or entity to whom the email was addressed. If you are not the intended recipient of this message, be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. Please delete this email from your system if you are not the intended recipient.

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

* Re: [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW
  2026-11-21 15:47 [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW Wayne Gao
@ 2026-11-23 11:44 ` John Garry
  2026-11-23 13:42   ` Pankaj Raghav (Samsung)
  2026-11-23 20:11 ` Dave Chinner
  1 sibling, 1 reply; 4+ messages in thread
From: John Garry @ 2026-11-23 11:44 UTC (permalink / raw)
  To: Wayne Gao, cem@kernel.org
  Cc: linux-xfs@vger.kernel.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org

On 11/21/26 15:47, Wayne Gao wrote:
> 

Christoph was proposing something similar here:

https://lore.kernel.org/linux-xfs/20250714131713.GA8742@lst.de/

Plesse check it. But it is for a difference purpose to what you propose, 
below. Actually, I am not sure on the motivation.

> 
> Hardware-capable devices normally prefer hardware atomic writes, making
> it difficult to exercise the software CoW path deterministically without
> changing file layouts or affecting ordinary writes.
> 
> Add a non-debug force_atomic_cow sysfs control for each filesystem.
> When enabled, route RWF_ATOMIC writes directly to the existing software
> CoW path regardless of hardware eligibility. Keep automatic selection
> as the default and reject enabling the control without software atomic
> write support.
> 
> Sample the setting once per I/O so in-flight requests retain their
> selected path. Preserve existing validation, completion and error
> handling, and leave non-atomic writes unchanged.
> 
> Report no separate optimized atomic write limit while CoW is forced
> and document the control's runtime scope and lifetime.
> 
> Validation: strict checkpatch passed. Linux kernel build and mounted-XFS
> runtime tests have not been run.
> 

Hmmm.. you are just describing what it does. Not why.

> Signed-off-by: Wayne Gao <wayne.gao1@solidigm.com>
> ---
> Hi Carlos and XFS developers,
> 
> I would appreciate feedback on this proposed interface.
> 
> The intended use is a controlled comparison of hardware-backed and
> software-backed RWF_ATOMIC writes on the same hardware, without having
> to construct misaligned mappings to trigger fallback.

Why do you want to compare?

> The existing
> DEBUG-only always_cow control also affects ordinary writes, which
> changes the workload being compared.
> 
> In particular, I would welcome feedback on:
> 
> 1. Whether a non-debug, per-filesystem sysfs control is appropriate,
>     or whether another existing testing mechanism should be extended.
> 
> 2. Whether reporting stx_atomic_write_unit_max_opt as zero while
>     software CoW is forced is the right behavior.
> 
> 3. The expected fstests coverage for this control. Intended coverage
>     includes off/on/off transitions on hardware-eligible writes,
>     per-filesystem isolation, unchanged non-atomic write routing,
>     rejection without software atomic write support, and concurrent
>     toggling with in-flight I/O.
> 
> Linux build, mounted-XFS testing and fstests coverage remain outstanding.
> This RFC is primarily requesting interface and semantic feedback, and
> does not make runtime performance claims.
> 
> Thanks,
> Wayne
> 
>   Documentation/ABI/testing/sysfs-fs-xfs | 42 ++++++++++++++++++++++++++
>   fs/xfs/xfs_file.c                      |  7 +++--
>   fs/xfs/xfs_iops.c                      |  4 +++
>   fs/xfs/xfs_mount.h                     |  1 +
>   fs/xfs/xfs_sysfs.c                     | 33 ++++++++++++++++++++
>   5 files changed, 84 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-fs-xfs b/Documentation/ABI/testing/sysfs-fs-xfs
> index 7da4de948..3d0c88df5 100644
> --- a/Documentation/ABI/testing/sysfs-fs-xfs
> +++ b/Documentation/ABI/testing/sysfs-fs-xfs
> @@ -35,3 +35,45 @@ Description:
>           outstanding transactions, including regrants due to
>           rolling transactions in bytes.
>   Users:         xfstests
> +
> +What:          /sys/fs/xfs/<disk>/force_atomic_cow
> +Date:          November 2026
> +Contact:       linux-xfs@vger.kernel.org
> +Description:
> +               Read-write boolean controlling the implementation of atomic
> +               writes. The default is 0, which prefers hardware atomic writes
> +               and falls back to software copy-on-write (CoW) when needed.
> +               Setting this to 1 forces RWF_ATOMIC writes to use software CoW,
> +               even when the request satisfies the hardware atomic write
> +               limits. Writes without RWF_ATOMIC are unaffected.
> +
> +               This control is available without CONFIG_XFS_DEBUG and is
> +               intended for testing and comparing the atomic write paths.
> +               Enabling it requires software atomic write support (currently
> +               the reflink feature); otherwise the write returns EOPNOTSUPP.
> +               Invalid boolean input returns EINVAL. Failed updates leave
> +               the setting unchanged.
> +
> +               The setting belongs to the filesystem instance and is shared
> +               by all mounts of that instance, including bind mounts. Each
> +               atomic write samples it once when selecting its I/O path.
> +               Changing it affects subsequent path selections, including
> +               writes through already open file descriptors, but does not
> +               wait for or redirect I/O that has already selected a path.
> +               Drain outstanding I/O before switching for comparisons that
> +               require an unambiguous boundary between the two modes.
> +
> +               Existing atomic write size, alignment and direct I/O
> +               requirements still apply. Forced CoW can fail for lack of
> +               space even when overwriting allocated data, and RWF_NOWAIT
> +               writes can return EAGAIN. Failures are not retried using
> +               hardware atomic writes.
> +
> +               While enabled, statx reports stx_atomic_write_unit_max_opt
> +               as 0, meaning that stx_atomic_write_unit_max is the optimized
> +               limit, with no separate hardware-optimized size range. The
> +               other atomic write limits are unchanged.
> +
> +               The setting survives remounts but is not stored on disk.
> +               A newly mounted filesystem instance starts with it disabled.
> +Users:         xfstests
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index 8070a07e6..6f45b22e3 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -787,10 +787,11 @@ xfs_file_dio_write_atomic(
>       const struct iomap_ops     *dops;
> 
>       /*
> -        * HW offload should be faster, so try that first if it is already
> -        * known that the write length is not too large.
> +        * Prefer HW offload unless software CoW is forced or the write length
> +        * exceeds the hardware limit.
>        */
> -       if (ocount > xfs_inode_buftarg(ip)->bt_awu_max)
> +       if (READ_ONCE(ip->i_mount->m_force_atomic_cow) ||
> +           ocount > xfs_inode_buftarg(ip)->bt_awu_max)
>           dops = &xfs_atomic_write_cow_iomap_ops;
>       else
>           dops = &xfs_direct_write_iomap_ops;
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index a84a4c1c3..c1720b2c9 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -664,6 +664,10 @@ xfs_get_atomic_write_max_opt(
>       const unsigned int hw_awu_max = xfs_inode_buftarg(ip)->bt_awu_max;
>       const xfs_fsize_t  hw_align_max = xfs_get_atomic_hw_write_align(ip);
> 
> +       /* Forced software writes have no separate hardware-optimized limit. */
> +       if (READ_ONCE(mp->m_force_atomic_cow))
> +               return 0;
> +
>       /* if the max is 1x block, then just keep behaviour that opt is 0 */
>       if (sw_awu_max <= mp->m_sb.sb_blocksize)
>           return 0;
> diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
> index cbcfb89c6..71f574c21 100644
> --- a/fs/xfs/xfs_mount.h
> +++ b/fs/xfs/xfs_mount.h
> @@ -239,6 +239,7 @@ typedef struct xfs_mount {
>                           /* low free space thresholds */
>       unsigned long              m_opstate;      /* dynamic state flags */
>       bool                       m_always_cow;
> +       bool                    m_force_atomic_cow;
>       bool                       m_fail_unmount;
>       bool                       m_finobt_nores; /* no per-AG finobt resv. */
>       bool                       m_update_sb;    /* sb needs update in mount */
> diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
> index 4a6a8c92c..b8fead80e 100644
> --- a/fs/xfs/xfs_sysfs.c
> +++ b/fs/xfs/xfs_sysfs.c
> @@ -67,7 +67,40 @@ static const struct sysfs_ops xfs_sysfs_ops = {
>       .store = xfs_sysfs_object_store,
>   };
> 
> +static inline struct xfs_mount *to_xfs_mount(struct kobject *kobj)
> +{
> +       return container_of(to_kobj(kobj), struct xfs_mount, m_kobj);
> +}
> +
> +static ssize_t
> +force_atomic_cow_store(struct kobject *kobject, const char *buf, size_t count)
> +{
> +       struct xfs_mount        *mp = to_xfs_mount(kobject);
> +       bool            enable;
> +       int             ret;
> +
> +       ret = kstrtobool(buf, &enable);
> +       if (ret)
> +               return ret;
> +
> +       if (enable && !xfs_can_sw_atomic_write(mp))
> +               return -EOPNOTSUPP;
> +
> +       WRITE_ONCE(mp->m_force_atomic_cow, enable);
> +       return count;
> +}
> +
> +static ssize_t
> +force_atomic_cow_show(struct kobject *kobject, char *buf)
> +{
> +       struct xfs_mount        *mp = to_xfs_mount(kobject);
> +
> +       return sysfs_emit(buf, "%d\n", READ_ONCE(mp->m_force_atomic_cow));
> +}
> +XFS_SYSFS_ATTR_RW(force_atomic_cow);
> +
>   static struct attribute *xfs_mp_attrs[] = {
> +       ATTR_LIST(force_atomic_cow),
>       NULL,
>   };
>   ATTRIBUTE_GROUPS(xfs_mp);
> 
> base-commit: 5e7b6fe39324913f6416c854c6ed3a1793aaba8e
> --
> 2.54.0.windows.1
> 
> Wayne Gao
> Principle Storage Solution Architect
> wechat: 13636331364
> solidigm.com
> 
> 
> 
> CONFIDENTIALITY NOTICE: This email and any files attached may contain confidential information and may be restricted from disclosure by corporate confidentiality guidelines, or applicable state and federal law. It is intended solely for the use of the person or entity to whom the email was addressed. If you are not the intended recipient of this message, be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. Please delete this email from your system if you are not the intended recipient.


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

* Re: [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW
  2026-11-23 11:44 ` John Garry
@ 2026-11-23 13:42   ` Pankaj Raghav (Samsung)
  0 siblings, 0 replies; 4+ messages in thread
From: Pankaj Raghav (Samsung) @ 2026-11-23 13:42 UTC (permalink / raw)
  To: John Garry
  Cc: Wayne Gao, cem@kernel.org, linux-xfs@vger.kernel.org,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, gost.dev,
	pankaj.raghav

On Mon, Nov 23, 2026 at 11:44:19AM +0000, John Garry wrote:
> On 11/21/26 15:47, Wayne Gao wrote:
> > 
> 
> Christoph was proposing something similar here:
> 
> https://lore.kernel.org/linux-xfs/20250714131713.GA8742@lst.de/
> 
> Plesse check it. But it is for a difference purpose to what you propose,
> below. Actually, I am not sure on the motivation.
> 
> > 
> > Hardware-capable devices normally prefer hardware atomic writes, making
> > it difficult to exercise the software CoW path deterministically without
> > changing file layouts or affecting ordinary writes.
> > 
> > Add a non-debug force_atomic_cow sysfs control for each filesystem.

Why do you think this should be a non-debug interface? Why would anyone
want to disable HW atomics if the device supports it in production?

> > When enabled, route RWF_ATOMIC writes directly to the existing software
> > CoW path regardless of hardware eligibility. Keep automatic selection
> > as the default and reject enabling the control without software atomic
> > write support.
> > 
> > Sample the setting once per I/O so in-flight requests retain their
> > selected path. Preserve existing validation, completion and error
> > handling, and leave non-atomic writes unchanged.
> > 
> > Report no separate optimized atomic write limit while CoW is forced
> > and document the control's runtime scope and lifetime.
> > 
> > Validation: strict checkpatch passed. Linux kernel build and mounted-XFS
> > runtime tests have not been run.
> > 
> 
> Hmmm.. you are just describing what it does. Not why.
> 
> > Signed-off-by: Wayne Gao <wayne.gao1@solidigm.com>
> > ---
> > Hi Carlos and XFS developers,
> > 
> > I would appreciate feedback on this proposed interface.
> > 
> > The intended use is a controlled comparison of hardware-backed and
> > software-backed RWF_ATOMIC writes on the same hardware, without having
> > to construct misaligned mappings to trigger fallback.
> 
> Why do you want to compare?
> 

Probably to measure the performance of HW atomics vs SW atomics?

If the goal is to compare HW atomics vs SW atomics, then a simple module
parameter in the nvme driver (or scsi) to disable atomics even on HW atomic
capable device should force SW atomics from XFS. I am not sure if it
needs to be in the upstream kernel.

-- 
Pankaj

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

* Re: [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW
  2026-11-21 15:47 [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW Wayne Gao
  2026-11-23 11:44 ` John Garry
@ 2026-11-23 20:11 ` Dave Chinner
  1 sibling, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2026-11-23 20:11 UTC (permalink / raw)
  To: Wayne Gao
  Cc: cem@kernel.org, linux-xfs@vger.kernel.org,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org

On Sat, Nov 21, 2026 at 03:47:32PM +0000, Wayne Gao wrote:
> 
> 
> Hardware-capable devices normally prefer hardware atomic writes, making
> it difficult to exercise the software CoW path deterministically without
> changing file layouts or affecting ordinary writes.

Why would we want to do this at runtime on production systems?


....

> The intended use is a controlled comparison of hardware-backed and
> software-backed RWF_ATOMIC writes on the same hardware, without having
> to construct misaligned mappings to trigger fallback. The existing
> DEBUG-only always_cow control also affects ordinary writes, which
> changes the workload being compared.

Ok, so you want it for your test/dev environment, not production?

I thought we could already change the block device characteristics (i.e. support hw
atomic wirite or not) at the block device level? If so, why do we
need this at the fs level? If not, why isn't it the hardware atomic
write behaviour configurable at the bdev level?

i.e. I don't understand why 'unmount; change bdev setting; mount' is
the obvious answer for back-to-back behavioural characterisation on
the same hardware and filesystem with different configurations?

Cheers,

Dave.
-- 
Dave Chinner
dgc@kernel.org

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

end of thread, other threads:[~2026-11-23 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 15:47 [RFC PATCH] xfs: add a per-filesystem switch to force atomic CoW Wayne Gao
2026-11-23 11:44 ` John Garry
2026-11-23 13:42   ` Pankaj Raghav (Samsung)
2026-11-23 20:11 ` Dave Chinner

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