[Linux-cachefs] [RFC][RFC PATCH 0/7] cifs: In-progress conversion to use iov_iters and netfslib
David Howells
dhowells at redhat.com
Tue Jan 25 13:57:04 UTC 2022
Hi Steve,
Okay, I've has a go at crudely splitting up my conversion of cifs to use
netfslib into separate patches and I thought I'd post it for you and Shyam
to have a look over:
(1) The conversion from ->readpages() to ->readahead().
(2) A patch that does some random miscellaneous bits.
(3) Change the I/O paths to use an iterator all the way to the socket
instead of a page list. Note that cifs won't compile from this patch
until patch 6.
(4) Replace cifs's writepages implementation with the one from afs and
make it deal with variable rsize and stuff like that. This sets up
iterators rather than page lists.
This also makes direct/unbuffered write use an iterator. This
probably requires more massaging to make it handle credits.
(5) Modify cifs_readahead() to hand an iterator down.
(6) Make direct and unbuffered reads hand an iterator down. Note that the
iterator refers to the original buffers and bounce pages aren't used.
(7) Make cifs use netfslib for reading.
As stated, patches 3, 4 and 5 don't compile because the pagelist struct
members disappeared to make way for the iterators. This avoids duplicating
various functions in the transport and transport security code. I'm not
sure how best to deal with this - maybe by setting up bvecs instead of
pagelists at the top level and then I can hand a bvec-class iter down.
The patches can also be found here. Note that this requires some of the
patches from my netfs-lib branch.
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=cifs-experimental
David
---
David Howells (7):
cifs: Transition from ->readpages() to ->readahead()
cifs: Miscellaneous bits
cifs: Change the I/O paths to use an iterator rather than a page list
cifs: Make cifs_writepages() hand an iterator down
cifs: Make cifs_readahead() pass an iterator down
cifs: Get direct I/O and unbuffered I/O working with iterators
cifs: Use netfslib to handle reads
fs/cifs/Kconfig | 1 +
fs/cifs/cifsencrypt.c | 40 +-
fs/cifs/cifsfs.c | 8 +-
fs/cifs/cifsfs.h | 6 +-
fs/cifs/cifsglob.h | 34 +-
fs/cifs/cifsproto.h | 11 +-
fs/cifs/cifssmb.c | 233 +++--
fs/cifs/connect.c | 18 +-
fs/cifs/file.c | 1930 ++++++++++------------------------------
fs/cifs/fscache.c | 31 -
fs/cifs/fscache.h | 52 --
fs/cifs/inode.c | 17 +-
fs/cifs/misc.c | 109 ---
fs/cifs/smb2ops.c | 365 ++++----
fs/cifs/smb2pdu.c | 27 +-
fs/cifs/transport.c | 37 +-
fs/netfs/read_helper.c | 7 +-
17 files changed, 888 insertions(+), 2038 deletions(-)
More information about the Linux-cachefs
mailing list