History

fs: Remove FS_THP_SUPPORT

Instead of setting a bit in the fs_flags to set a bit in the address_space, set the bit in the address_space directly.

Matthew Wilcox (Oracle) committed 5 years ago

Commit ff36da61 parent a1efe484 files · +18 −4Browse files

Showing the changes to include (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/fs.h +0 −1
  2. include/linux/pagemap.h +16 −0
include/linux/fs.h+0−1
@@ -2518,7 +2518,6 @@ struct file_system_type { · 2517 unmodified lines
25182518 #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
25192519 #define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */
25202520 #define FS_ALLOW_IDMAP 32 /* FS has been updated to handle vfs idmappings. */
2521−#define FS_THP_SUPPORT 8192 /* Remove once all fs converted */
25222521 #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
25232522 int (*init_fs_context)(struct fs_context *);
25242523 const struct fs_parameter_spec *parameters;
include/linux/pagemap.h+16−0
@@ -176,6 +176,22 @@ static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask) · 175 unmodified lines
176176 m->gfp_mask = mask;
177177 }
178178
179+/**
180+ * mapping_set_large_folios() - Indicate the file supports large folios.
181+ * @mapping: The file.
182+ *
183+ * The filesystem should call this function in its inode constructor to
184+ * indicate that the VFS can use large folios to cache the contents of
185+ * the file.
186+ *
187+ * Context: This should not be called while the inode is active as it
188+ * is non-atomic.
189+ */
190+static inline void mapping_set_large_folios(struct address_space *mapping)
191+{
192+ __set_bit(AS_THP_SUPPORT, &mapping->flags);
193+}
194+
179195 static inline bool mapping_thp_support(struct address_space *mapping)
180196 {
181197 return test_bit(AS_THP_SUPPORT, &mapping->flags);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t