[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429650.1613476535@warthog.procyon.org.uk>
Date: Tue, 16 Feb 2021 11:55:35 +0000
From: David Howells <dhowells@...hat.com>
To: Christoph Hellwig <hch@....de>
Cc: dhowells@...hat.com, Trond Myklebust <trondmy@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Steve French <sfrench@...ba.org>,
Dominique Martinet <asmadeus@...ewreck.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Matthew Wilcox <willy@...radead.org>, linux-mm@...ck.org,
linux-cachefs@...hat.com, linux-afs@...ts.infradead.org,
linux-nfs@...r.kernel.org, linux-cifs@...r.kernel.org,
ceph-devel@...r.kernel.org, v9fs-developer@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, Jeff Layton <jlayton@...hat.com>,
David Wysochanski <dwysocha@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/33] vfs: Export rw_verify_area() for use by cachefiles
Christoph Hellwig <hch@....de> wrote:
> > Export rw_verify_area() for so that cachefiles can use it before issuing
> > call_read_iter() and call_write_iter() to effect async DIO operations
> > against the cache. This is analogous to aio_read() and aio_write().
>
> I don't think this is the right thing to do. Instead of calling
> into ->read_iter / ->write_iter directly this should be using helpers.
>
> What prevents you from using vfs_iocb_iter_read and
> vfs_iocb_iter_write which seem the right level of abstraction for this?
I don't think they existed when I wrote this code. Should aio use that too,
btw? I modelled my code on aio_read() and aio_write().
But I can certainly switch to using vfs_iocb_iter_read/write, though the
trivial checks are redundant. The fsnotify call, I guess I'm missing though
(and is that missing in aio_read/write() also?).
David
Powered by blists - more mailing lists