From 7708320f3b672558f2bab98b7ca695f13c0e0449 Mon Sep 17 00:00:00 2001 From: William Gill Date: Thu, 23 Apr 2026 09:01:48 -0500 Subject: [PATCH] v1.28-notify-1: patches for scoutfs v1.28 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of the three notify patches onto scoutfs v1.28. v1.28 predates SCOUTFS_IOC_PUNCH_OFFLINE (nr 24, introduced in v1.29), so two trivial hunk fixes were needed during rebase: kmod/src/ioctl.h: drop the PUNCH_OFFLINE struct + define from the notify patch's context, since the surrounding definition doesn't exist in v1.28. Our SCOUTFS_IOC_READ_NOTIFY stays at nr 25 — Linux ioctl numbers are sparse and don't require the predecessor. kmod/src/ioctl.c: drop the PUNCH_OFFLINE dispatch case from the context for the same reason. Resulting ABI is identical to v1.29-notify-1 and v1.30-notify-1: SCOUTFS_IOC_READ_NOTIFY is nr 25 on all three, so scoutfs-notifyd and any third-party consumer need zero per-version branching. Branch purpose: scoutfs-build's multi-version pipeline checks out this branch (via SCOUTFS_NOTIFY_REF=v1.28-notify-1) when building kmod RPMs for scoutfs v1.28. --- base.txt | 2 +- ...le-access-notification-infrastructure.patch | 18 +++++++++--------- ...0002-notify-file-open-read-hook-sites.patch | 8 ++++---- ...notifyd-userspace-relay-daemon-Go-1.2.patch | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/base.txt b/base.txt index 17e2248..f2f7474 100644 --- a/base.txt +++ b/base.txt @@ -1 +1 @@ -v1.30 +v1.28 diff --git a/patches/0001-notify-core-file-access-notification-infrastructure.patch b/patches/0001-notify-core-file-access-notification-infrastructure.patch index 9d180ac..dc4dfc2 100644 --- a/patches/0001-notify-core-file-access-notification-infrastructure.patch +++ b/patches/0001-notify-core-file-access-notification-infrastructure.patch @@ -1,4 +1,4 @@ -From 6c5b791d47079df892ee25e6f17c22da2f643340 Mon Sep 17 00:00:00 2001 +From 1be639b8a4fdfaac37fc5801a314d080200105cb Mon Sep 17 00:00:00 2001 From: William Gill Date: Wed, 22 Apr 2026 14:38:51 -0500 Subject: [PATCH 1/3] notify: core file-access notification infrastructure @@ -84,7 +84,7 @@ index 9088496..94e4f44 100644 EXPAND_COUNTER(orphan_scan_attempts) \ EXPAND_COUNTER(orphan_scan_cached) \ diff --git a/kmod/src/ioctl.c b/kmod/src/ioctl.c -index 0a5fc4c..b3a4d9a 100644 +index 7a73d4d..9893559 100644 --- a/kmod/src/ioctl.c +++ b/kmod/src/ioctl.c @@ -47,6 +47,7 @@ @@ -95,22 +95,22 @@ index 0a5fc4c..b3a4d9a 100644 #include "scoutfs_trace.h" #include "util.h" -@@ -1790,6 +1791,8 @@ long scoutfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +@@ -1718,6 +1719,8 @@ long scoutfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + return scoutfs_ioc_mod_quota_rule(file, arg, false); + case SCOUTFS_IOC_READ_XATTR_INDEX: return scoutfs_ioc_read_xattr_index(file, arg); - case SCOUTFS_IOC_PUNCH_OFFLINE: - return scoutfs_ioc_punch_offline(file, arg); + case SCOUTFS_IOC_READ_NOTIFY: + return scoutfs_ioc_read_notify(file, arg); } return -ENOTTY; diff --git a/kmod/src/ioctl.h b/kmod/src/ioctl.h -index c0d2285..d468d4c 100644 +index cefecd4..23fda13 100644 --- a/kmod/src/ioctl.h +++ b/kmod/src/ioctl.h -@@ -876,4 +876,88 @@ struct scoutfs_ioctl_punch_offline { - #define SCOUTFS_IOC_PUNCH_OFFLINE \ - _IOW(SCOUTFS_IOCTL_MAGIC, 24, struct scoutfs_ioctl_punch_offline) +@@ -848,4 +848,88 @@ struct scoutfs_ioctl_read_xattr_index { + #define SCOUTFS_IOC_READ_XATTR_INDEX \ + _IOR(SCOUTFS_IOCTL_MAGIC, 23, struct scoutfs_ioctl_read_xattr_index) +/* + * File access notification stream (observer-only). diff --git a/patches/0002-notify-file-open-read-hook-sites.patch b/patches/0002-notify-file-open-read-hook-sites.patch index b08bbc1..df6131a 100644 --- a/patches/0002-notify-file-open-read-hook-sites.patch +++ b/patches/0002-notify-file-open-read-hook-sites.patch @@ -1,4 +1,4 @@ -From 496b47ab6dab052baecdfbabb0c92649a89d65b4 Mon Sep 17 00:00:00 2001 +From e970d4d8c6ab1f13cc7e2e51a830ba2f387b62d3 Mon Sep 17 00:00:00 2001 From: William Gill Date: Wed, 22 Apr 2026 14:40:04 -0500 Subject: [PATCH 2/3] notify: file open/read hook sites @@ -37,7 +37,7 @@ Nothing in the data-waiter state machine is touched. 2 files changed, 39 insertions(+) diff --git a/kmod/src/data.c b/kmod/src/data.c -index 0abb48c..33a61af 100644 +index 7903e8d..6e3b133 100644 --- a/kmod/src/data.c +++ b/kmod/src/data.c @@ -41,6 +41,7 @@ @@ -48,7 +48,7 @@ index 0abb48c..33a61af 100644 /* * We want to amortize work done after dirtying the shared transaction -@@ -2304,6 +2305,32 @@ const struct address_space_operations scoutfs_file_aops = { +@@ -2207,6 +2208,32 @@ const struct address_space_operations scoutfs_file_aops = { .write_end = scoutfs_write_end, }; @@ -81,7 +81,7 @@ index 0abb48c..33a61af 100644 const struct file_operations scoutfs_file_fops = { #ifdef KC_LINUX_HAVE_FOP_AIO_READ .read = do_sync_read, -@@ -2316,6 +2343,7 @@ const struct file_operations scoutfs_file_fops = { +@@ -2219,6 +2246,7 @@ const struct file_operations scoutfs_file_fops = { .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write, #endif diff --git a/patches/0003-notify-scoutfs-notifyd-userspace-relay-daemon-Go-1.2.patch b/patches/0003-notify-scoutfs-notifyd-userspace-relay-daemon-Go-1.2.patch index 6d002b2..cfb151e 100644 --- a/patches/0003-notify-scoutfs-notifyd-userspace-relay-daemon-Go-1.2.patch +++ b/patches/0003-notify-scoutfs-notifyd-userspace-relay-daemon-Go-1.2.patch @@ -1,4 +1,4 @@ -From b6cbfc46485cb9b7f5e87d0ff451f81c25d7d41c Mon Sep 17 00:00:00 2001 +From a227eecabc78f331fcb8c483e6051021cb44a94b Mon Sep 17 00:00:00 2001 From: William Gill Date: Wed, 22 Apr 2026 14:40:34 -0500 Subject: [PATCH 3/3] notify: scoutfs-notifyd userspace relay daemon (Go 1.26)