* add and use a per-mapping stable writes flag v2
@ 2023-10-25 14:10 Christoph Hellwig
2023-10-25 14:10 ` [PATCH 1/4] filemap: add a per-mapping stable writes flag Christoph Hellwig
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Christoph Hellwig @ 2023-10-25 14:10 UTC (permalink / raw)
To: Jens Axboe, Matthew Wilcox
Cc: Ilya Dryomov, Andrew Morton, linux-block, linux-fsdevel,
linux-xfs, linux-mm
Hi all
A while ago Ilya pointer out that since commit 1cb039f3dc16 ("bdi:
replace BDI_CAP_STABLE_WRITES with a queue and a sb flag"), the stable
write flag on the queue wasn't used for writes to the block devices
nodes any more, and willy suggested fixing this by adding a stable write
flags on each address_space. This series implements this fix, and also
fixes the stable write flag when the XFS RT device requires it, but the
main device doesn't (which is probably more a theoretical than a
practical problem).
Changes since v1:
- add a xfs cleanup patch
Diffstat:
block/bdev.c | 2 ++
fs/inode.c | 2 ++
fs/xfs/xfs_inode.h | 8 ++++++++
fs/xfs/xfs_ioctl.c | 30 ++++++++++++++++++++----------
fs/xfs/xfs_iops.c | 7 +++++++
include/linux/pagemap.h | 17 +++++++++++++++++
mm/page-writeback.c | 2 +-
7 files changed, 57 insertions(+), 11 deletions(-)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] filemap: add a per-mapping stable writes flag
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
@ 2023-10-25 14:10 ` Christoph Hellwig
2023-10-25 14:10 ` [PATCH 2/4] block: update the stable_writes flag in bdev_add Christoph Hellwig
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2023-10-25 14:10 UTC (permalink / raw)
To: Jens Axboe, Matthew Wilcox
Cc: Ilya Dryomov, Andrew Morton, linux-block, linux-fsdevel,
linux-xfs, linux-mm, Darrick J . Wong
folio_wait_stable waits for writeback to finish before modifying the
contents of a folio again, e.g. to support check summing of the data
in the block integrity code.
Currently this behavior is controlled by the SB_I_STABLE_WRITES flag
on the super_block, which means it is uniform for the entire file system.
This is wrong for the block device pseudofs which is shared by all
block devices, or file systems that can use multiple devices like XFS
witht the RT subvolume or btrfs (although btrfs currently reimplements
folio_wait_stable anyway).
Add a per-address_space AS_STABLE_WRITES flag to control the behavior
in a more fine grained way. The existing SB_I_STABLE_WRITES is kept
to initialize AS_STABLE_WRITES to the existing default which covers
most cases.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Tested-by: Ilya Dryomov <idryomov@gmail.com>
---
fs/inode.c | 2 ++
include/linux/pagemap.h | 17 +++++++++++++++++
mm/page-writeback.c | 2 +-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/fs/inode.c b/fs/inode.c
index 84bc3c76e5ccb5..ae1a6410b53d7e 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -215,6 +215,8 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
lockdep_set_class_and_name(&mapping->invalidate_lock,
&sb->s_type->invalidate_lock_key,
"mapping.invalidate_lock");
+ if (sb->s_iflags & SB_I_STABLE_WRITES)
+ mapping_set_stable_writes(mapping);
inode->i_private = NULL;
inode->i_mapping = mapping;
INIT_HLIST_HEAD(&inode->i_dentry); /* buggered by rcu freeing */
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 351c3b7f93a14e..8c9608b217b000 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -204,6 +204,8 @@ enum mapping_flags {
AS_NO_WRITEBACK_TAGS = 5,
AS_LARGE_FOLIO_SUPPORT = 6,
AS_RELEASE_ALWAYS, /* Call ->release_folio(), even if no private data */
+ AS_STABLE_WRITES, /* must wait for writeback before modifying
+ folio contents */
};
/**
@@ -289,6 +291,21 @@ static inline void mapping_clear_release_always(struct address_space *mapping)
clear_bit(AS_RELEASE_ALWAYS, &mapping->flags);
}
+static inline bool mapping_stable_writes(const struct address_space *mapping)
+{
+ return test_bit(AS_STABLE_WRITES, &mapping->flags);
+}
+
+static inline void mapping_set_stable_writes(struct address_space *mapping)
+{
+ set_bit(AS_STABLE_WRITES, &mapping->flags);
+}
+
+static inline void mapping_clear_stable_writes(struct address_space *mapping)
+{
+ clear_bit(AS_STABLE_WRITES, &mapping->flags);
+}
+
static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
{
return mapping->gfp_mask;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index b8d3d7040a506a..4656534b8f5cc6 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -3110,7 +3110,7 @@ EXPORT_SYMBOL_GPL(folio_wait_writeback_killable);
*/
void folio_wait_stable(struct folio *folio)
{
- if (folio_inode(folio)->i_sb->s_iflags & SB_I_STABLE_WRITES)
+ if (mapping_stable_writes(folio_mapping(folio)))
folio_wait_writeback(folio);
}
EXPORT_SYMBOL_GPL(folio_wait_stable);
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] block: update the stable_writes flag in bdev_add
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
2023-10-25 14:10 ` [PATCH 1/4] filemap: add a per-mapping stable writes flag Christoph Hellwig
@ 2023-10-25 14:10 ` Christoph Hellwig
2023-10-25 14:10 ` [PATCH 3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags Christoph Hellwig
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2023-10-25 14:10 UTC (permalink / raw)
To: Jens Axboe, Matthew Wilcox
Cc: Ilya Dryomov, Andrew Morton, linux-block, linux-fsdevel,
linux-xfs, linux-mm, Darrick J . Wong
Propagate the per-queue stable_write flags into each bdev inode in bdev_add.
This makes sure devices that require stable writes have it set for I/O
on the block device node as well.
Note that this doesn't cover the case of a flag changing on a live device
yet. We should handle that as well, but I plan to cover it as part of a
more general rework of how changing runtime paramters on block devices
works.
Fixes: 1cb039f3dc16 ("bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag")
Reported-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Tested-by: Ilya Dryomov <idryomov@gmail.com>
---
block/bdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/bdev.c b/block/bdev.c
index f3b13aa1b7d428..04dba25b0019eb 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -425,6 +425,8 @@ void bdev_set_nr_sectors(struct block_device *bdev, sector_t sectors)
void bdev_add(struct block_device *bdev, dev_t dev)
{
+ if (bdev_stable_writes(bdev))
+ mapping_set_stable_writes(bdev->bd_inode->i_mapping);
bdev->bd_dev = dev;
bdev->bd_inode->i_rdev = dev;
bdev->bd_inode->i_ino = dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
2023-10-25 14:10 ` [PATCH 1/4] filemap: add a per-mapping stable writes flag Christoph Hellwig
2023-10-25 14:10 ` [PATCH 2/4] block: update the stable_writes flag in bdev_add Christoph Hellwig
@ 2023-10-25 14:10 ` Christoph Hellwig
2023-10-25 14:39 ` Darrick J. Wong
2023-10-25 14:10 ` [PATCH 4/4] xfs: respect the stable writes flag on the RT device Christoph Hellwig
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2023-10-25 14:10 UTC (permalink / raw)
To: Jens Axboe, Matthew Wilcox
Cc: Ilya Dryomov, Andrew Morton, linux-block, linux-fsdevel,
linux-xfs, linux-mm
Introduce a local boolean variable if FS_XFLAG_REALTIME to make the
checks for it more obvious, and de-densify a few of the conditionals
using it to make them more readable while at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_ioctl.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 55bb01173cde8c..be69e7be713e5c 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1120,23 +1120,25 @@ xfs_ioctl_setattr_xflags(
struct fileattr *fa)
{
struct xfs_mount *mp = ip->i_mount;
+ bool rtflag = (fa->fsx_xflags & FS_XFLAG_REALTIME);
uint64_t i_flags2;
- /* Can't change realtime flag if any extents are allocated. */
- if ((ip->i_df.if_nextents || ip->i_delayed_blks) &&
- XFS_IS_REALTIME_INODE(ip) != (fa->fsx_xflags & FS_XFLAG_REALTIME))
- return -EINVAL;
+ if (rtflag != XFS_IS_REALTIME_INODE(ip)) {
+ /* Can't change realtime flag if any extents are allocated. */
+ if (ip->i_df.if_nextents || ip->i_delayed_blks)
+ return -EINVAL;
+ }
- /* If realtime flag is set then must have realtime device */
- if (fa->fsx_xflags & FS_XFLAG_REALTIME) {
+ if (rtflag) {
+ /* If realtime flag is set then must have realtime device */
if (mp->m_sb.sb_rblocks == 0 || mp->m_sb.sb_rextsize == 0 ||
(ip->i_extsize % mp->m_sb.sb_rextsize))
return -EINVAL;
- }
- /* Clear reflink if we are actually able to set the rt flag. */
- if ((fa->fsx_xflags & FS_XFLAG_REALTIME) && xfs_is_reflink_inode(ip))
- ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK;
+ /* Clear reflink if we are actually able to set the rt flag. */
+ if (xfs_is_reflink_inode(ip))
+ ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK;
+ }
/* diflags2 only valid for v3 inodes. */
i_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags);
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] xfs: respect the stable writes flag on the RT device
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
` (2 preceding siblings ...)
2023-10-25 14:10 ` [PATCH 3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags Christoph Hellwig
@ 2023-10-25 14:10 ` Christoph Hellwig
2023-10-25 14:40 ` Darrick J. Wong
2023-11-08 8:05 ` add and use a per-mapping stable writes flag v2 Christoph Hellwig
2023-11-20 14:07 ` Christian Brauner
5 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2023-10-25 14:10 UTC (permalink / raw)
To: Jens Axboe, Matthew Wilcox
Cc: Ilya Dryomov, Andrew Morton, linux-block, linux-fsdevel,
linux-xfs, linux-mm
Update the per-folio stable writes flag dependening on which device an
inode resides on.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_inode.h | 8 ++++++++
fs/xfs/xfs_ioctl.c | 8 ++++++++
fs/xfs/xfs_iops.c | 7 +++++++
3 files changed, 23 insertions(+)
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index 0c5bdb91152e1c..682959c8f78cb0 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -561,6 +561,14 @@ extern void xfs_setup_inode(struct xfs_inode *ip);
extern void xfs_setup_iops(struct xfs_inode *ip);
extern void xfs_diflags_to_iflags(struct xfs_inode *ip, bool init);
+static inline void xfs_update_stable_writes(struct xfs_inode *ip)
+{
+ if (bdev_stable_writes(xfs_inode_buftarg(ip)->bt_bdev))
+ mapping_set_stable_writes(VFS_I(ip)->i_mapping);
+ else
+ mapping_clear_stable_writes(VFS_I(ip)->i_mapping);
+}
+
/*
* When setting up a newly allocated inode, we need to call
* xfs_finish_inode_setup() once the inode is fully instantiated at
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index be69e7be713e5c..535f6d38cdb540 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1149,6 +1149,14 @@ xfs_ioctl_setattr_xflags(
ip->i_diflags2 = i_flags2;
xfs_diflags_to_iflags(ip, false);
+
+ /*
+ * Make the stable writes flag match that of the device the inode
+ * resides on when flipping the RT flag.
+ */
+ if (rtflag != XFS_IS_REALTIME_INODE(ip) && S_ISREG(VFS_I(ip)->i_mode))
+ xfs_update_stable_writes(ip);
+
xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG);
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
XFS_STATS_INC(mp, xs_ig_attrchg);
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 2b3b05c28e9e48..b8ec045708c318 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -1298,6 +1298,13 @@ xfs_setup_inode(
gfp_mask = mapping_gfp_mask(inode->i_mapping);
mapping_set_gfp_mask(inode->i_mapping, (gfp_mask & ~(__GFP_FS)));
+ /*
+ * For real-time inodes update the stable write flags to that of the RT
+ * device instead of the data device.
+ */
+ if (S_ISREG(inode->i_mode) && XFS_IS_REALTIME_INODE(ip))
+ xfs_update_stable_writes(ip);
+
/*
* If there is no attribute fork no ACL can exist on this inode,
* and it can't have any file capabilities attached to it either.
--
2.39.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags
2023-10-25 14:10 ` [PATCH 3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags Christoph Hellwig
@ 2023-10-25 14:39 ` Darrick J. Wong
0 siblings, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2023-10-25 14:39 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, Matthew Wilcox, Ilya Dryomov, Andrew Morton,
linux-block, linux-fsdevel, linux-xfs, linux-mm
On Wed, Oct 25, 2023 at 04:10:19PM +0200, Christoph Hellwig wrote:
> Introduce a local boolean variable if FS_XFLAG_REALTIME to make the
> checks for it more obvious, and de-densify a few of the conditionals
> using it to make them more readable while at it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_ioctl.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 55bb01173cde8c..be69e7be713e5c 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1120,23 +1120,25 @@ xfs_ioctl_setattr_xflags(
> struct fileattr *fa)
> {
> struct xfs_mount *mp = ip->i_mount;
> + bool rtflag = (fa->fsx_xflags & FS_XFLAG_REALTIME);
> uint64_t i_flags2;
>
> - /* Can't change realtime flag if any extents are allocated. */
> - if ((ip->i_df.if_nextents || ip->i_delayed_blks) &&
> - XFS_IS_REALTIME_INODE(ip) != (fa->fsx_xflags & FS_XFLAG_REALTIME))
> - return -EINVAL;
> + if (rtflag != XFS_IS_REALTIME_INODE(ip)) {
> + /* Can't change realtime flag if any extents are allocated. */
> + if (ip->i_df.if_nextents || ip->i_delayed_blks)
> + return -EINVAL;
> + }
>
> - /* If realtime flag is set then must have realtime device */
> - if (fa->fsx_xflags & FS_XFLAG_REALTIME) {
> + if (rtflag) {
> + /* If realtime flag is set then must have realtime device */
> if (mp->m_sb.sb_rblocks == 0 || mp->m_sb.sb_rextsize == 0 ||
> (ip->i_extsize % mp->m_sb.sb_rextsize))
> return -EINVAL;
> - }
>
> - /* Clear reflink if we are actually able to set the rt flag. */
> - if ((fa->fsx_xflags & FS_XFLAG_REALTIME) && xfs_is_reflink_inode(ip))
> - ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK;
> + /* Clear reflink if we are actually able to set the rt flag. */
> + if (xfs_is_reflink_inode(ip))
> + ip->i_diflags2 &= ~XFS_DIFLAG2_REFLINK;
> + }
>
> /* diflags2 only valid for v3 inodes. */
> i_flags2 = xfs_flags2diflags2(ip, fa->fsx_xflags);
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] xfs: respect the stable writes flag on the RT device
2023-10-25 14:10 ` [PATCH 4/4] xfs: respect the stable writes flag on the RT device Christoph Hellwig
@ 2023-10-25 14:40 ` Darrick J. Wong
0 siblings, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2023-10-25 14:40 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, Matthew Wilcox, Ilya Dryomov, Andrew Morton,
linux-block, linux-fsdevel, linux-xfs, linux-mm
On Wed, Oct 25, 2023 at 04:10:20PM +0200, Christoph Hellwig wrote:
> Update the per-folio stable writes flag dependening on which device an
> inode resides on.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks good now,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_inode.h | 8 ++++++++
> fs/xfs/xfs_ioctl.c | 8 ++++++++
> fs/xfs/xfs_iops.c | 7 +++++++
> 3 files changed, 23 insertions(+)
>
> diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
> index 0c5bdb91152e1c..682959c8f78cb0 100644
> --- a/fs/xfs/xfs_inode.h
> +++ b/fs/xfs/xfs_inode.h
> @@ -561,6 +561,14 @@ extern void xfs_setup_inode(struct xfs_inode *ip);
> extern void xfs_setup_iops(struct xfs_inode *ip);
> extern void xfs_diflags_to_iflags(struct xfs_inode *ip, bool init);
>
> +static inline void xfs_update_stable_writes(struct xfs_inode *ip)
> +{
> + if (bdev_stable_writes(xfs_inode_buftarg(ip)->bt_bdev))
> + mapping_set_stable_writes(VFS_I(ip)->i_mapping);
> + else
> + mapping_clear_stable_writes(VFS_I(ip)->i_mapping);
> +}
> +
> /*
> * When setting up a newly allocated inode, we need to call
> * xfs_finish_inode_setup() once the inode is fully instantiated at
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index be69e7be713e5c..535f6d38cdb540 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -1149,6 +1149,14 @@ xfs_ioctl_setattr_xflags(
> ip->i_diflags2 = i_flags2;
>
> xfs_diflags_to_iflags(ip, false);
> +
> + /*
> + * Make the stable writes flag match that of the device the inode
> + * resides on when flipping the RT flag.
> + */
> + if (rtflag != XFS_IS_REALTIME_INODE(ip) && S_ISREG(VFS_I(ip)->i_mode))
> + xfs_update_stable_writes(ip);
> +
> xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG);
> xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
> XFS_STATS_INC(mp, xs_ig_attrchg);
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index 2b3b05c28e9e48..b8ec045708c318 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -1298,6 +1298,13 @@ xfs_setup_inode(
> gfp_mask = mapping_gfp_mask(inode->i_mapping);
> mapping_set_gfp_mask(inode->i_mapping, (gfp_mask & ~(__GFP_FS)));
>
> + /*
> + * For real-time inodes update the stable write flags to that of the RT
> + * device instead of the data device.
> + */
> + if (S_ISREG(inode->i_mode) && XFS_IS_REALTIME_INODE(ip))
> + xfs_update_stable_writes(ip);
> +
> /*
> * If there is no attribute fork no ACL can exist on this inode,
> * and it can't have any file capabilities attached to it either.
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: add and use a per-mapping stable writes flag v2
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
` (3 preceding siblings ...)
2023-10-25 14:10 ` [PATCH 4/4] xfs: respect the stable writes flag on the RT device Christoph Hellwig
@ 2023-11-08 8:05 ` Christoph Hellwig
2023-11-08 16:25 ` Darrick J. Wong
2023-11-20 14:07 ` Christian Brauner
5 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2023-11-08 8:05 UTC (permalink / raw)
To: Jens Axboe, Matthew Wilcox
Cc: Ilya Dryomov, Andrew Morton, linux-block, linux-fsdevel,
linux-xfs, linux-mm
Can we get at least patches 1 and 2 queued for for 6.7 given that
they fix a regression?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: add and use a per-mapping stable writes flag v2
2023-11-08 8:05 ` add and use a per-mapping stable writes flag v2 Christoph Hellwig
@ 2023-11-08 16:25 ` Darrick J. Wong
0 siblings, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2023-11-08 16:25 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, Matthew Wilcox, Ilya Dryomov, Andrew Morton,
linux-block, linux-fsdevel, linux-xfs, linux-mm
On Wed, Nov 08, 2023 at 09:05:18AM +0100, Christoph Hellwig wrote:
> Can we get at least patches 1 and 2 queued for for 6.7 given that
> they fix a regression?
I would say that all four should go in 6.7 because patches 3-4 fix wrong
behavior if the rtdev needs stablewrites but the datadev does not.
There probably aren't many users of a RHEL-disabled feature atop
specialty hardware, but IIRC it's still a data corruption vector.
(says me who blew up his last T10 PI drive last week :()
--D
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: add and use a per-mapping stable writes flag v2
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
` (4 preceding siblings ...)
2023-11-08 8:05 ` add and use a per-mapping stable writes flag v2 Christoph Hellwig
@ 2023-11-20 14:07 ` Christian Brauner
5 siblings, 0 replies; 10+ messages in thread
From: Christian Brauner @ 2023-11-20 14:07 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Christian Brauner, Ilya Dryomov, Andrew Morton, linux-block,
linux-fsdevel, linux-xfs, linux-mm, Jens Axboe, Matthew Wilcox
On Wed, 25 Oct 2023 16:10:16 +0200, Christoph Hellwig wrote:
> A while ago Ilya pointer out that since commit 1cb039f3dc16 ("bdi:
> replace BDI_CAP_STABLE_WRITES with a queue and a sb flag"), the stable
> write flag on the queue wasn't used for writes to the block devices
> nodes any more, and willy suggested fixing this by adding a stable write
> flags on each address_space. This series implements this fix, and also
> fixes the stable write flag when the XFS RT device requires it, but the
> main device doesn't (which is probably more a theoretical than a
> practical problem).
>
> [...]
Ok, I've picked this up now. Let me know if this needs to go through
someone else.
---
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/4] filemap: add a per-mapping stable writes flag
https://git.kernel.org/vfs/vfs/c/cb293ec9f897
[2/4] block: update the stable_writes flag in bdev_add
https://git.kernel.org/vfs/vfs/c/743958a2f50b
[3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags
https://git.kernel.org/vfs/vfs/c/f04f350d39eb
[4/4] xfs: respect the stable writes flag on the RT device
https://git.kernel.org/vfs/vfs/c/60fc2887c158
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-11-20 14:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25 14:10 add and use a per-mapping stable writes flag v2 Christoph Hellwig
2023-10-25 14:10 ` [PATCH 1/4] filemap: add a per-mapping stable writes flag Christoph Hellwig
2023-10-25 14:10 ` [PATCH 2/4] block: update the stable_writes flag in bdev_add Christoph Hellwig
2023-10-25 14:10 ` [PATCH 3/4] xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags Christoph Hellwig
2023-10-25 14:39 ` Darrick J. Wong
2023-10-25 14:10 ` [PATCH 4/4] xfs: respect the stable writes flag on the RT device Christoph Hellwig
2023-10-25 14:40 ` Darrick J. Wong
2023-11-08 8:05 ` add and use a per-mapping stable writes flag v2 Christoph Hellwig
2023-11-08 16:25 ` Darrick J. Wong
2023-11-20 14:07 ` Christian Brauner
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).