forked from tstabrawa/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux page migration code won't wait for writeback to complete unless it needs to call release_folio. Call SetPagePrivate wherever PageUptodate is set and define .release_folio, to cause fallback_migrate_folio to wait for us. Signed-off-by: Tim Stabrawa <59430211+tstabrawa@users.noreply.github.com> Closes openzfs#15140
- Loading branch information
Showing
7 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
dnl # | ||
dnl # Linux 5.18 uses invalidate_folio in lieu of invalidate_page | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_INVALIDATE_FOLIO], [ | ||
ZFS_LINUX_TEST_SRC([vfs_has_invalidate_folio], [ | ||
#include <linux/fs.h> | ||
static void | ||
test_invalidate_folio(struct folio *folio, size_t offset, | ||
size_t len) { | ||
(void) folio; (void) offset; (void) len; | ||
return; | ||
} | ||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.invalidate_folio = test_invalidate_folio, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_VFS_INVALIDATE_FOLIO], [ | ||
dnl # | ||
dnl # Linux 5.18 uses invalidate_folio in lieu of invalidate_page | ||
dnl # | ||
AC_MSG_CHECKING([whether invalidate_folio exists]) | ||
ZFS_LINUX_TEST_RESULT([vfs_has_invalidate_folio], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_VFS_INVALIDATE_FOLIO, 1, [invalidate_folio exists]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
dnl # | ||
dnl # Linux 3.11 has three parameters for invalidate_page | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_INVALIDATE_PAGE_WITH_LEN], [ | ||
ZFS_LINUX_TEST_SRC([vfs_has_invalidate_page_with_len], [ | ||
#include <linux/fs.h> | ||
static void | ||
test_invalidate_page(struct page *page, unsigned int offset, | ||
unsigned int len) { | ||
(void) page; (void) offset; (void) len; | ||
return; | ||
} | ||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.invalidate_page = test_invalidate_page, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_VFS_INVALIDATE_PAGE_WITH_LEN], [ | ||
dnl # | ||
dnl # Linux 3.11 has three parameters for invalidate_page | ||
dnl # | ||
AC_MSG_CHECKING([whether invalidate_page has len]) | ||
ZFS_LINUX_TEST_RESULT([vfs_has_invalidate_page_with_len], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_VFS_INVALIDATE_PAGE_WITH_LEN, 1, [invalidate_page has len]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
dnl # | ||
dnl # Linux 5.19 uses release_folio in lieu of releasepage | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RELEASE_FOLIO], [ | ||
ZFS_LINUX_TEST_SRC([vfs_has_release_folio], [ | ||
#include <linux/fs.h> | ||
static bool | ||
test_release_folio(struct folio *folio, gfp_t gfp) { | ||
(void) folio; (void) gfp; | ||
return (0); | ||
} | ||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.release_folio = test_release_folio, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_VFS_RELEASE_FOLIO], [ | ||
dnl # | ||
dnl # Linux 5.19 uses release_folio in lieu of releasepage | ||
dnl # | ||
AC_MSG_CHECKING([whether release_folio exists]) | ||
ZFS_LINUX_TEST_RESULT([vfs_has_release_folio], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_VFS_RELEASE_FOLIO, 1, [release_folio exists]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters