Apply fanotify-related documentation changes
cover Apply fanotify-related documentation changes
From: Chuck Lever <[email protected]>
These extra commits were requested by Amir Goldstein <[email protected]>. Note that c0baf9ac0b05 ("docs: Document the FAN_FS_ERROR event") is already applied to v5.10.y.
Gabriel Krisman Bertazi (2):
samples: Add fs error monitoring example
samples: Make fs-monitor depend on libc and headers
Linus Torvalds (1):
Add gitignore file for samples/fanotify/ subdirectory
samples/Kconfig | 8 ++ samples/Makefile | 1 + samples/fanotify/.gitignore | 1 + samples/fanotify/Makefile | 5 ++ samples/fanotify/fs-monitor.c | 142 ++++++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+) create mode 100644 samples/fanotify/.gitignore create mode 100644 samples/fanotify/Makefile create mode 100644 samples/fanotify/fs-monitor.c
Signature · 1 line
2.45.2
PATCH 1/3 samples: Add fs error monitoring example
From: Gabriel Krisman Bertazi <[email protected]>
[ Upstream commit 5451093081db6ca1a708d149e11cfd219800bc4c ]
Introduce an example of a FAN_FS_ERROR fanotify user to track filesystem errors.
--- samples/Kconfig | 8 ++ samples/Makefile | 1 + samples/fanotify/Makefile | 5 ++ samples/fanotify/fs-monitor.c | 142 ++++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 samples/fanotify/Makefile create mode 100644 samples/fanotify/fs-monitor.c
samples/Kconfig +8 -0
@@ -120,6 +120,14 @@ config SAMPLE_CONNECTOR with it. See also Documentation/driver-api/connector.rst +config SAMPLE_FANOTIFY_ERROR + bool "Build fanotify error monitoring sample" + depends on FANOTIFY + help + When enabled, this builds an example code that uses the + FAN_FS_ERROR fanotify mechanism to monitor filesystem + errors. + config SAMPLE_HIDRAW bool "hidraw sample" depends on CC_CAN_LINK && HEADERS_INSTALL
samples/Makefile +1 -0
@@ -5,6 +5,7 @@ subdir-$(CONFIG_SAMPLE_AUXDISPLAY) += auxdisplay subdir-$(CONFIG_SAMPLE_ANDROID_BINDERFS) += binderfs obj-$(CONFIG_SAMPLE_CONFIGFS) += configfs/ obj-$(CONFIG_SAMPLE_CONNECTOR) += connector/ +obj-$(CONFIG_SAMPLE_FANOTIFY_ERROR) += fanotify/ subdir-$(CONFIG_SAMPLE_HIDRAW) += hidraw obj-$(CONFIG_SAMPLE_HW_BREAKPOINT) += hw_breakpoint/ obj-$(CONFIG_SAMPLE_KDB) += kdb/
samples/fanotify/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only +userprogs-always-y += fs-monitor + +userccflags += -I usr/include -Wall +
samples/fanotify/fs-monitor.c new file +142 -0
142 lines not on this page · raw message
Signature · 1 line
2.45.2
PATCH 2/3 samples: Make fs-monitor depend on libc and headers
In reply to [email protected]From: Gabriel Krisman Bertazi <[email protected]>
[ Upstream commit 8fc70b3a142f97f7859bf052151df896933d2586 ]
Prevent build errors when headers or libc are not available, such as on kernel build bots, like the below:
samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file or directory
7 | #include <errno.h>
| ^~~~~~~~~
--- samples/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
samples/Kconfig +1 -1
@@ -122,7 +122,7 @@ config SAMPLE_CONNECTOR config SAMPLE_FANOTIFY_ERROR bool "Build fanotify error monitoring sample" - depends on FANOTIFY + depends on FANOTIFY && CC_CAN_LINK && HEADERS_INSTALL help When enabled, this builds an example code that uses the FAN_FS_ERROR fanotify mechanism to monitor filesystem
Signature · 1 line
2.45.2
PATCH 3/3 Add gitignore file for samples/fanotify/ subdirectory
In reply to [email protected]From: Linus Torvalds <[email protected]>
[ Upstream commit c107fb9b4f8338375b3e865c3d2c1d98ccb3a95a ]
Commit 5451093081db ("samples: Add fs error monitoring example") added a new sample program, but didn't teach git to ignore the new generated files, causing unnecessary noise from 'git status' after a full build.
Add the 'fs-monitor' sample executable to the .gitignore for this subdirectory to silence it all again.
--- samples/fanotify/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 samples/fanotify/.gitignore
samples/fanotify/.gitignore new file +1 -0
@@ -0,0 +1 @@ +fs-monitor
Signature · 1 line
2.45.2
Greg KH
maintainerQuoted 13 lines · On Thu, Jul 25, 2024 at 11:32:26AM -0400, [email protected] wrote:
From: Chuck Lever <[email protected]>
These extra commits were requested by Amir Goldstein <[email protected]>. Note that
c0baf9ac0b05("docs: Document theFAN_FS_ERRORevent") is already applied to v5.10.y.Gabriel Krisman Bertazi (2):
samples: Add fs error monitoring example
samples: Make fs-monitor depend on libc and headersLinus Torvalds (1):
Add gitignore file forsamples/fanotify/subdirectory
Quoted 14 lines
samples/Kconfig | 8 ++ samples/Makefile | 1 + samples/fanotify/.gitignore | 1 + samples/fanotify/Makefile | 5 ++ samples/fanotify/fs-monitor.c | 142 ++++++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+) create mode 100644 samples/fanotify/.gitignore create mode 100644 samples/fanotify/Makefile create mode 100644 samples/fanotify/fs-monitor.cSignature · 1 line
2.45.2
Now queued up, thanks.
greg k-h