summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2024-11-15 18:30:24 +0300
committerJan Kara <jack@suse.cz>2024-12-10 14:03:17 +0300
commit870499bc1d4dc04cba1f63dd5e7bc02b983e2458 (patch)
tree6ad026d52405ba68e72f31d4ce5517fb314d34ee /include
parent4f8afa33817a6420398d1c177c6e220a05081f51 (diff)
downloadlinux-870499bc1d4dc04cba1f63dd5e7bc02b983e2458.tar.xz
fanotify: report file range info with pre-content events
With group class FAN_CLASS_PRE_CONTENT, report offset and length info along with FAN_PRE_ACCESS pre-content events. This information is meant to be used by hierarchical storage managers that want to fill partial content of files on first access to range. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/b90a9e6c809dd3cad5684da90f23ea93ec6ce8c8.1731684329.git.josef@toxicpanda.com
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/fanotify.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h
index 7596168c80eb..0636a9c85dd0 100644
--- a/include/uapi/linux/fanotify.h
+++ b/include/uapi/linux/fanotify.h
@@ -146,6 +146,7 @@ struct fanotify_event_metadata {
#define FAN_EVENT_INFO_TYPE_DFID 3
#define FAN_EVENT_INFO_TYPE_PIDFD 4
#define FAN_EVENT_INFO_TYPE_ERROR 5
+#define FAN_EVENT_INFO_TYPE_RANGE 6
/* Special info types for FAN_RENAME */
#define FAN_EVENT_INFO_TYPE_OLD_DFID_NAME 10
@@ -192,6 +193,13 @@ struct fanotify_event_info_error {
__u32 error_count;
};
+struct fanotify_event_info_range {
+ struct fanotify_event_info_header hdr;
+ __u32 pad;
+ __u64 offset;
+ __u64 count;
+};
+
/*
* User space may need to record additional information about its decision.
* The extra information type records what kind of information is included.