* [Devel] [PATCH hci-8.1 v2 5/5] fs/ext4: do not permit swapext on fs with fast commit enabled
@ 2026-11-17 17:01 Alexey Kuznetsov
0 siblings, 0 replies; only message in thread
From: Alexey Kuznetsov @ 2026-11-17 17:01 UTC (permalink / raw)
To: devel, khorenko, kui.liu, azaitsev
We do not allow fast commit on fs used by csd. In case the fs
accidentally has fast_commit feature enabled, just disable
swapext to be on safe side.
Fixes: 1a3d440e7fbc ("fs/ext4: swapext ioctl")
Affects: #VSTOR-155601
https://virtuozzo.atlassian.net/browse/VSTOR-155601
Signed-off-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
Feature: ext4: swapext ioctl: swap range of blocks between two files
---
fs/ext4/move_extent.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index b25f2865df89..fc4ba7547eeb 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -888,6 +888,10 @@ ext4_ioc_swap_extents(struct file *o_filp, struct file *d_filp, __u64 orig_blk,
if (!EXT4_SB(orig_inode->i_sb)->s_journal)
return -EOPNOTSUPP;
+ /* Fast commit cannot log extent swap, so we do not support it */
+ if (test_opt2(orig_inode->i_sb, JOURNAL_FAST_COMMIT))
+ return -EOPNOTSUPP;
+
/* TODO: it's not obvious how to swap blocks for inodes with full
* journaling enabled
*/
--
2.47.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-17 17:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 17:01 [Devel] [PATCH hci-8.1 v2 5/5] fs/ext4: do not permit swapext on fs with fast commit enabled Alexey Kuznetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox