[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOQ4uxgA+_4_UtVz17_eJL6m0CsDEVuiriBj1ZOkho+Ub1yuSA@mail.gmail.com>
Date: Mon, 15 Jun 2020 13:05:08 +0300
From: Amir Goldstein <amir73il@...il.com>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: Mike Kravetz <mike.kravetz@...cle.com>,
Al Viro <viro@...iv.linux.org.uk>,
Linux MM <linux-mm@...ck.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
overlayfs <linux-unionfs@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Matthew Wilcox <willy@...radead.org>,
Colin Walters <walters@...bum.org>,
Andrew Morton <akpm@...ux-foundation.org>,
syzbot <syzbot+d6ec23007e951dadf3de@...kaller.appspotmail.com>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>
Subject: Re: [PATCH v4 1/2] hugetlb: use f_mode & FMODE_HUGETLBFS to identify
hugetlbfs files
On Mon, Jun 15, 2020 at 10:53 AM Miklos Szeredi <miklos@...redi.hu> wrote:
>
> On Sat, Jun 13, 2020 at 9:12 PM Mike Kravetz <mike.kravetz@...cle.com> wrote:
> >
> > On 6/12/20 11:53 PM, Amir Goldstein wrote:
>
> > As a hugetlbfs developer, I do not know of a use case for interoperability
> > with overlayfs. So yes, I am not too interested in making them work well
> > together. However, if there was an actual use case I would be more than
> > happy to consider doing the work. Just hate to put effort into fixing up
> > two 'special' filesystems for functionality that may not be used.
> >
> > I can't speak for overlayfs developers.
>
> As I said, I only know of tmpfs being upper layer as a valid use case.
> Does that work with hugepages? How would I go about testing that?
Simple, after enabling CONFIG_HUGETLBFS:
diff --git a/mount_union.py b/mount_union.py
index fae8899..4070c70 100644
--- a/mount_union.py
+++ b/mount_union.py
@@ -15,7 +15,7 @@ def mount_union(ctx):
snapshot_mntroot = cfg.snapshot_mntroot()
if cfg.should_mount_upper():
system("mount " + upper_mntroot + " 2>/dev/null"
- " || mount -t tmpfs upper_layer " + upper_mntroot)
+ " || mount -t hugetlbfs upper_layer " + upper_mntroot)
layer_mntroot = upper_mntroot + "/" + ctx.curr_layer()
upperdir = layer_mntroot + "/u"
workdir = layer_mntroot + "/w"
It fails colossally, because hugetlbfs, does not have write_iter().
It is only meant as an interface to create named maps of huge pages.
So I don't really see the use case for using it as upper.
Thanks,
Amir.
Powered by blists - more mailing lists