Two-patch series that layers an observer-only file-access notification stream onto scoutfs. See README.md for the design summary and rebase workflow. Base: scoutfs v1.29
scoutfs-notify
Observer-only file access notifications for ScoutFS.
Maintained as a rebasable git format-patch series so it can be layered onto
each upstream release with minimal maintenance.
What it adds
- New mount option
notify_events=0|1(default0) that turns on a per-mount ring buffer of file open and read events. - New mount option
notify_ring_kb=N(4..4096, default 64) sizing that ring. - New ioctl
SCOUTFS_IOC_READ_NOTIFY(nr 25) that lets a single privileged userspace reader drain the ring. Reader is expected to relay events over a Unix socket to a watcher daemon. - Three percpu counters:
notify_emitted,notify_dropped_ring_full,notify_reader_attached.
The notification path is strictly observer-only: if the ring fills, records
are dropped but the monotonic seq field still advances so readers see a
gap. notify_events=0 reduces the hook to a single predicted-false branch.
Nothing in the data-waiter state machine is touched by this series; a future patch series may add data-waiter observation events (reserved type values 3+).
Base
Currently rebased against:
scoutfs v1.29
See base.txt for the exact tag the patches target.
Applying
On a git checkout of scoutfs at the base tag:
./apply.sh /path/to/scoutfs
The script runs git am --3way against each patches/*.patch. Requires the
target to be a git working tree.
For a non-git tarball, apply with:
cd /path/to/scoutfs
for p in /path/to/scoutfs-notify/patches/*.patch; do
patch -p1 < "$p"
done
Rebasing onto a new upstream release
# In your scoutfs working clone
git fetch --tags
git checkout -B notify v1.30 # new upstream tag
git am --3way patches/*.patch # from this repo
# ... resolve any conflicts, git am --continue ...
git format-patch v1.30..notify -o patches/
# Update base.txt and commit the refreshed patches
Tagging
Tag releases of the patch set with both the upstream version and a patch revision so consumers can pin precisely:
v1.29-notify-1
v1.29-notify-2
v1.30-notify-1