Linux-Fsdevel Archive on lore.kernel.org help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org> To: Mike Kravetz <mike.kravetz@oracle.com> Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, overlayfs <linux-unionfs@vger.kernel.org>, linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>, Miklos Szeredi <miklos@szeredi.hu>, Colin Walters <walters@verbum.org>, Andrew Morton <akpm@linux-foundation.org>, syzbot <syzbot+d6ec23007e951dadf3de@syzkaller.appspotmail.com>, syzkaller-bugs <syzkaller-bugs@googlegroups.com> Subject: Re: [PATCH v4 1/2] hugetlb: use f_mode & FMODE_HUGETLBFS to identify hugetlbfs files Date: Thu, 11 Jun 2020 18:53:26 -0700 [thread overview] Message-ID: <20200612015326.GD8681@bombadil.infradead.org> (raw) In-Reply-To: <20200612004644.255692-1-mike.kravetz@oracle.com> On Thu, Jun 11, 2020 at 05:46:43PM -0700, Mike Kravetz wrote: > The routine is_file_hugepages() checks f_op == hugetlbfs_file_operations > to determine if the file resides in hugetlbfs. This is problematic when > the file is on a union or overlay. Instead, define a new file mode > FMODE_HUGETLBFS which is set when a hugetlbfs file is opened. The mode > can easily be copied to other 'files' derived from the original hugetlbfs > file. > > With this change hugetlbfs_file_operations can be static as it should be. > > There is also a (duplicate) set of shm file operations used for the routine > is_file_shm_hugepages(). Instead of setting/using special f_op's, just > propagate the FMODE_HUGETLBFS mode. This means is_file_shm_hugepages() and > the duplicate f_ops can be removed. > > While cleaning things up, change the name of is_file_hugepages() to > is_file_hugetlbfs(). The term hugepages is a bit ambiguous. I was going to have objections to this before I read it more carefully and realised that the "shm" here is sysvipc and doesn't have anything to do with the huge page support in shmfs. > A subsequent patch will propagate FMODE_HUGETLBFS in overlayfs. > > Suggested-by: Al Viro <viro@zeniv.linux.org.uk> > Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> I might have suggested splitting the rename of is_file_hugetlbfs() from the rest of this patch, but I wouldn't resend to change that.
next prev parent reply other threads:[~2020-06-12 1:53 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-12 0:46 [PATCH v4 1/2] hugetlb: use f_mode & FMODE_HUGETLBFS to identify hugetlbfs files Mike Kravetz 2020-06-12 0:46 ` [PATCH v4 2/2] ovl: call underlying get_unmapped_area() routine. propogate FMODE_HUGETLBFS Mike Kravetz 2020-06-14 12:50 ` Amir Goldstein 2020-06-12 1:53 ` Matthew Wilcox [this message] 2020-06-12 1:58 ` [PATCH v4 1/2] hugetlb: use f_mode & FMODE_HUGETLBFS to identify hugetlbfs files Al Viro 2020-06-12 21:51 ` Mike Kravetz 2020-06-13 6:53 ` Amir Goldstein 2020-06-13 14:38 ` Matthew Wilcox 2020-06-13 19:12 ` Mike Kravetz 2020-06-15 7:53 ` Miklos Szeredi 2020-06-15 10:05 ` Amir Goldstein 2020-06-15 13:01 ` Miklos Szeredi 2020-06-15 23:45 ` Mike Kravetz 2020-06-16 9:01 ` Miklos Szeredi 2020-06-15 8:24 ` Miklos Szeredi 2020-06-15 17:48 ` Mike Kravetz 2020-06-12 6:28 ` [RFC PATCH] hugetlb: hugetlbfs_file_operations can be static kernel test robot
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=20200612015326.GD8681@bombadil.infradead.org \ --to=willy@infradead.org \ --cc=akpm@linux-foundation.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-unionfs@vger.kernel.org \ --cc=mike.kravetz@oracle.com \ --cc=miklos@szeredi.hu \ --cc=syzbot+d6ec23007e951dadf3de@syzkaller.appspotmail.com \ --cc=syzkaller-bugs@googlegroups.com \ --cc=viro@zeniv.linux.org.uk \ --cc=walters@verbum.org \ /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: linkBe 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; as well as URLs for NNTP newsgroup(s).