Message ID | 20200212041845.25879-10-willy@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Large pages in the page cache | expand |
On Tue, Feb 11, 2020 at 08:18:29PM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" <willy@infradead.org> > > The page cache needs to know whether the filesystem supports pages > > PAGE_SIZE. Does it make sense to set this flag on the file_system_type, which is rather broad scope, or a specific superblock or even inode? For some file systems we might require on-disk flags that aren't set for all instances.
On Tue, Feb 11, 2020 at 11:43:18PM -0800, Christoph Hellwig wrote: > On Tue, Feb 11, 2020 at 08:18:29PM -0800, Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" <willy@infradead.org> > > > > The page cache needs to know whether the filesystem supports pages > > > PAGE_SIZE. > > Does it make sense to set this flag on the file_system_type, which > is rather broad scope, or a specific superblock or even inode? > > For some file systems we might require on-disk flags that aren't set > for all instances. I don't see why we'd need on-disk flags or need to control this on a per-inode or per-sb basis. My intent for this flag is to represent whether the filesystem understands large pages; how the file is cached should make no difference to the on-disk layout.
diff --git a/include/linux/fs.h b/include/linux/fs.h index d4e2d2964346..24e720723afb 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2235,6 +2235,7 @@ struct file_system_type { #define FS_HAS_SUBTYPE 4 #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ #define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */ +#define FS_LARGE_PAGES 8192 /* Remove once all fs converted */ #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ int (*init_fs_context)(struct fs_context *); const struct fs_parameter_spec *parameters;