* [Devel] [PATCH hci-8.1] ve/fs: let a container mount ext2 and ext3 through the ext4 driver
@ 2026-10-21 18:03 Eva Kurchatova
2026-10-21 18:07 ` no-reply
2026-10-22 16:44 ` Konstantin Khorenko
0 siblings, 2 replies; 3+ messages in thread
From: Eva Kurchatova @ 2026-10-21 18:03 UTC (permalink / raw)
To: khorenko; +Cc: devel
The ext4 driver also registers the ext2 and ext3 filesystem types, and
those two carry none of the container flags ext4 itself has, so inside
a container they are absent from /proc/filesystems and a mount of an
ext2 or ext3 image fails with "unknown filesystem type", while the same
image mounts as ext4. It is the same code either way, so give the two
aliases the same flags; LTP formats its test devices as ext2 by default
and every one of those tests breaks in a container on that mount.
https://virtuozzo.atlassian.net/browse/VSTOR-132330
Feature: fs: whiltelist what can be mounted in a CT
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
fs/ext4/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e292c0597eaf..0f73473e2d4d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -137,7 +137,7 @@ static struct file_system_type ext2_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = ext4_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_VIRTUALIZED | FS_VE_MOUNT,
};
MODULE_ALIAS_FS("ext2");
MODULE_ALIAS("ext2");
@@ -153,7 +153,7 @@ static struct file_system_type ext3_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = ext4_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_VIRTUALIZED | FS_VE_MOUNT,
};
MODULE_ALIAS_FS("ext3");
MODULE_ALIAS("ext3");
--
2.56.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Devel] [PATCH hci-8.1] ve/fs: let a container mount ext2 and ext3 through the ext4 driver
2026-10-21 18:03 [Devel] [PATCH hci-8.1] ve/fs: let a container mount ext2 and ext3 through the ext4 driver Eva Kurchatova
@ 2026-10-21 18:07 ` no-reply
2026-10-22 16:44 ` Konstantin Khorenko
1 sibling, 0 replies; 3+ messages in thread
From: no-reply @ 2026-10-21 18:07 UTC (permalink / raw)
To: khorenko, Eva Kurchatova; +Cc: devel
> The ext4 driver also registers the ext2 and ext3 filesystem types, and
> those two carry none of the container flags ext4 itself has, so inside
> a container they are absent from /proc/filesystems and a mount of an
> ext2 or ext3 image fails with "unknown filesystem type", while the same
> image mounts as ext4. It is the same code either way, so give the two
> aliases the same flags; LTP formats its test devices as ext2 by default
> and every one of those tests breaks in a container on that mount.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-132330
> Feature: fs: whiltelist what can be mounted in a CT
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261021180310.2341467-1-eva.kurchatova@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Devel] [PATCH hci-8.1] ve/fs: let a container mount ext2 and ext3 through the ext4 driver
2026-10-21 18:03 [Devel] [PATCH hci-8.1] ve/fs: let a container mount ext2 and ext3 through the ext4 driver Eva Kurchatova
2026-10-21 18:07 ` no-reply
@ 2026-10-22 16:44 ` Konstantin Khorenko
1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Khorenko @ 2026-10-22 16:44 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On 10/21/26 20:03, Eva Kurchatova wrote:
> The ext4 driver also registers the ext2 and ext3 filesystem types, and
> those two carry none of the container flags ext4 itself has, so inside
> a container they are absent from /proc/filesystems and a mount of an
> ext2 or ext3 image fails with "unknown filesystem type", while the same
> image mounts as ext4. It is the same code either way, so give the two
> aliases the same flags; LTP formats its test devices as ext2 by default
> and every one of those tests breaks in a container on that mount.
i do not see any reason to enable mounting ext2/ext3 filesystems inside
Containers while we already allow ext4 mounts.
We do support ext4 inside a CT and we test it.
We do not test ext2/ext3 - why to allow it?
Until we have a proper usecase / a request from a customer, i would not enable it.
If we are talking about LTP tests, we can run currently failing tests inside a CT
with LTP_DEV_FS_TYPE=... set
>
> https://virtuozzo.atlassian.net/browse/VSTOR-132330
> Feature: fs: whiltelist what can be mounted in a CT
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
> ---
> fs/ext4/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index e292c0597eaf..0f73473e2d4d 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -137,7 +137,7 @@ static struct file_system_type ext2_fs_type = {
> .init_fs_context = ext4_init_fs_context,
> .parameters = ext4_param_specs,
> .kill_sb = ext4_kill_sb,
> - .fs_flags = FS_REQUIRES_DEV,
> + .fs_flags = FS_REQUIRES_DEV | FS_VIRTUALIZED | FS_VE_MOUNT,
> };
> MODULE_ALIAS_FS("ext2");
> MODULE_ALIAS("ext2");
> @@ -153,7 +153,7 @@ static struct file_system_type ext3_fs_type = {
> .init_fs_context = ext4_init_fs_context,
> .parameters = ext4_param_specs,
> .kill_sb = ext4_kill_sb,
> - .fs_flags = FS_REQUIRES_DEV,
> + .fs_flags = FS_REQUIRES_DEV | FS_VIRTUALIZED | FS_VE_MOUNT,
> };
> MODULE_ALIAS_FS("ext3");
> MODULE_ALIAS("ext3");
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-22 16:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 18:03 [Devel] [PATCH hci-8.1] ve/fs: let a container mount ext2 and ext3 through the ext4 driver Eva Kurchatova
2026-10-21 18:07 ` no-reply
2026-10-22 16:44 ` Konstantin Khorenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.