mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-30 18:05:43 +00:00
Hook up buffer_migrate_folio
This works together with the dropped block_write_full_page(), allowing us to drop the _writepage() method as long as we implement _writepages(). Since v5.19-rc3-395-g67235182a41c. This used to be the .migratepage() method. Signed-off-by: Auke Kok <auke.kok@versity.com>
This commit is contained in:
@@ -578,3 +578,12 @@ endif
|
||||
ifneq (,$(shell grep 'const struct attribute_group ..default_groups;' include/linux/kobject.h))
|
||||
ccflags-y += -DKC_KOBJECT_DEFAULT_GROUPS
|
||||
endif
|
||||
|
||||
#
|
||||
# v5.19-rc3-395-g67235182a41c
|
||||
#
|
||||
# Adds buffer_migrate_folio(), similar to other fss. Quote willy: "If the filesystem
|
||||
# implements migrate_folio and writepages, there is no need for a writepage implementation."
|
||||
ifneq (,$(shell grep 'int buffer_migrate_folio.struct address_space' include/linux/buffer_head.h))
|
||||
ccflags-y += -DKC_HAVE_BUFFER_MIGRATE_FOLIO
|
||||
endif
|
||||
|
||||
@@ -2302,6 +2302,9 @@ const struct address_space_operations scoutfs_file_aops = {
|
||||
.dirty_folio = block_dirty_folio,
|
||||
.invalidate_folio = block_invalidate_folio,
|
||||
.read_folio = scoutfs_read_folio,
|
||||
#ifdef KC_HAVE_BUFFER_MIGRATE_FOLIO
|
||||
.migrate_folio = buffer_migrate_folio,
|
||||
#endif
|
||||
#else
|
||||
.readpage = scoutfs_readpage,
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user