From: Alexey Kuznetsov <kuznet@virtuozzo.com>
To: devel@openvz.org, khorenko@virtuozzo.com, kui.liu@virtuozzo.com,
azaitsev@virtuozzo.com
Subject: [Devel] [PATCH hci-8.1 v2 5/5] fs/ext4: do not permit swapext on fs with fast commit enabled
Date: Wed, 18 Nov 2026 01:01:01 +0800 [thread overview]
Message-ID: <avyITVHNta/34iNz@mops2> (raw)
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
reply other threads:[~2026-11-17 17:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avyITVHNta/34iNz@mops2 \
--to=kuznet@virtuozzo.com \
--cc=azaitsev@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=kui.liu@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox