mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Linux 7.0: explicitly set setlease handler to kernel implementation
The upcoming 7.0 kernel will no longer fall back to generic_setlease(), instead returning EINVAL if .setlease is NULL. So, we set it explicitly. To ensure that we catch any future kernel change, adds a sanity test for F_SETLEASE and F_GETLEASE too. Since this is a Linux-specific test, also a small adjustment to the test runner to allow OS-specific helper programs. Sponsored-by: TrueNAS Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@truenas.com> Closes #18215
This commit is contained in:
@@ -43,6 +43,9 @@
|
||||
#ifdef HAVE_VFS_FILEMAP_DIRTY_FOLIO
|
||||
#include <linux/writeback.h>
|
||||
#endif
|
||||
#ifdef HAVE_FILELOCK_HEADER
|
||||
#include <linux/filelock.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When using fallocate(2) to preallocate space, inflate the requested
|
||||
@@ -1242,6 +1245,7 @@ const struct file_operations zpl_file_operations = {
|
||||
.mmap = zpl_mmap,
|
||||
.fsync = zpl_fsync,
|
||||
.fallocate = zpl_fallocate,
|
||||
.setlease = generic_setlease,
|
||||
.copy_file_range = zpl_copy_file_range,
|
||||
#ifdef HAVE_VFS_CLONE_FILE_RANGE
|
||||
.clone_file_range = zpl_clone_file_range,
|
||||
|
||||
Reference in New Issue
Block a user