Thread (1 message) 1 message, 1 author, 2021-10-15

Re: [PATCH v7 20/28] fanotify: Support enqueueing of error events

From: Gabriel Krisman Bertazi <hidden>
Date: 2021-10-15 16:50:51
Also in: linux-ext4, linux-fsdevel

Possibly related (same subject, not in this thread)

Amir Goldstein [off-list ref] writes:
On Fri, Oct 15, 2021 at 12:39 AM Gabriel Krisman Bertazi
[off-list ref] wrote:
quoted
Once an error event is triggered, collect the data from the fs error
report and enqueue it in the notification group, similarly to what is
done for other events.  FAN_FS_ERROR is no longer handled specially,
since the memory is now handled by a preallocated mempool.

For now, make the event unhashed.  A future patch implements merging for
these kinds of events.

Signed-off-by: Gabriel Krisman Bertazi <redacted>
---
 fs/notify/fanotify/fanotify.c | 35 +++++++++++++++++++++++++++++++++++
 fs/notify/fanotify/fanotify.h |  6 ++++++
 2 files changed, 41 insertions(+)
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 01d68dfc74aa..9b970359570a 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -574,6 +574,27 @@ static struct fanotify_event *fanotify_alloc_name_event(struct inode *id,
        return &fne->fae;
 }

+static struct fanotify_event *fanotify_alloc_error_event(
+                                               struct fsnotify_group *group,
+                                               __kernel_fsid_t *fsid,
+                                               const void *data, int data_type)
+{
+       struct fs_error_report *report =
+                       fsnotify_data_error_report(data, data_type);
+       struct fanotify_error_event *fee;
+
+       if (WARN_ON(!report))
WARN_ON_ONCE please.

Commit message claims to collect the data from the report,
but this commit does nothing with the report??
I moved it out to a separate commit and forgot to update the commit
message.  Fixed. Thanks!

-- 
Gabriel Krisman Bertazi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help