lkml.org 
[lkml]   [2023]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 0/3+1] fanotify accounting for fs/splice.c
On Tue 27-06-23 21:51:05, Christoph Hellwig wrote:
> Can you please resend this outside this thread? I really cant't see
> what's new or old here if you have a reply-to in the old thread.
>
> On Tue, Jun 27, 2023 at 06:55:22PM +0200, Ahelenia Ziemiańska wrote:
> > In 1/3 I've applied if/else if/else tree like you said,
> > and expounded a bit in the message.
> >
> > This is less pretty now, however, since it turns out that
> > iter_file_splice_write() already marks the out fd as written because it
> > writes to it via vfs_iter_write(), and that sent a double notification.
>
> It seems like vfs_iter_write is the wrong level to implement
> ->splice_write given that the the ->splice_write caller has already
> checked f_mode, done the equivalent of rw_verify_area and
> should do the fsnotify_modify. I'd suggest to just open code the
> relevant parts of vfs_iocb_iter_write in iter_file_splice_write.

Yeah, looking into the code I agree (with a small remark that unlike
vfs_iocb_iter_write() this particular variant also needs to work with files
providing only ->write and not ->write_iter). But we can live with
duplicate events for now and this seems like a rather separate cleanup to
do.

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR

\
 
 \ /
  Last update: 2023-06-28 12:41    [W:0.187 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site