* [Devel] [PATCH VZ10 v2] fs: adapt to new checks of fallocate mode
@ 2026-09-06 13:30 Alexey Kuznetsov
0 siblings, 0 replies; only message in thread
From: Alexey Kuznetsov @ 2026-09-06 13:30 UTC (permalink / raw)
To: devel, khorenko, kui.liu, azaitsev
This small lapse halved performance of vstorage.
This is fix for previous our patch 91e338d1..
"fs/ext4: introduce FALLOC_FL_PREALLOCATE flag to fallocate"
required to port it to current vz10 kernel.
Affects: #VSTOR-142784
Signed-off-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
---
fs/ext4/extents.c | 3 ++-
fs/open.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b771cb5..38f5077 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4769,7 +4769,8 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
if (ret)
goto out_inode_lock;
- if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ALLOCATE_RANGE) {
+ if ((mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_ALLOCATE_RANGE ||
+ (mode & FALLOC_FL_MODE_MASK) == FALLOC_FL_PREALLOCATE) {
ret = ext4_do_fallocate(file, offset, len, mode);
goto out_inode_lock;
}
diff --git a/fs/open.c b/fs/open.c
index 91f4785..fc72ad0 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -267,6 +267,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
case FALLOC_FL_ALLOCATE_RANGE:
case FALLOC_FL_UNSHARE_RANGE:
case FALLOC_FL_ZERO_RANGE:
+ case FALLOC_FL_PREALLOCATE:
break;
case FALLOC_FL_PUNCH_HOLE:
if (!(mode & FALLOC_FL_KEEP_SIZE))
--
1.8.3.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-09-06 13:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-06 13:30 [Devel] [PATCH VZ10 v2] fs: adapt to new checks of fallocate mode Alexey Kuznetsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox