From 407389d7fedc37de627cbb31fc42431dcd799173 Mon Sep 17 00:00:00 2001 From: achims311 <1224648+achims311@users.noreply.github.com> Date: Fri, 11 Nov 2022 10:59:58 +0100 Subject: [PATCH] Allow zfs file systems in mount check zfs works with named pools, which are not visible in the file system. Fixes #7 --- fatrace.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fatrace.c b/fatrace.c index 352aa31..d4f0dda 100644 --- a/fatrace.c +++ b/fatrace.c @@ -378,8 +378,11 @@ setup_fanotify (int fan_fd) * are virtual and do not actually cause disk access. */ if (mount->mnt_fsname == NULL || access (mount->mnt_fsname, F_OK) != 0 || mount->mnt_fsname[0] != '/') { - debug ("ignore: fsname: %s dir: %s type: %s", mount->mnt_fsname, mount->mnt_dir, mount->mnt_type); - continue; + /* zfs mount point don't start with a "/" so allow them anyway */ + if (strcmp(mount->mnt_type, "zfs") != 0) { + debug ("ignore: fsname: %s dir: %s type: %s", mount->mnt_fsname, mount->mnt_dir, mount->mnt_type); + continue; + } } /* root dir already added above */