Re: [PATCH 04/33] vfs: Export rw_verify_area() for use by cachefiles

From
David Howells <dhowells@redhat.com>
Date
2021-02-16 11:57:27
Also in
ceph-devel, linux-cifs, linux-mm, linux-nfs, lkml
Reply to
Christoph Hellwig, 2021-02-16
Christoph Hellwig [off-list ref] wrote:
quoted
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
Thread (69 messages) 69 messages, 9 authors, last reply 2021-02-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help