linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Steve French <smfrench@gmail.com>
Cc: David Howells <dhowells@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Shyam Prasad N <nspmangalore@gmail.com>,
	Rohith Surabattula <rohiths.msft@gmail.com>,
	Tom Talpey <tom@talpey.com>, Stefan Metzmacher <metze@samba.org>,
	Christoph Hellwig <hch@infradead.org>,
	Matthew Wilcox <willy@infradead.org>,
	Jeff Layton <jlayton@kernel.org>,
	linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, Steve French <sfrench@samba.org>
Subject: [PATCH 11/11] cifs: DIO to/from KVEC-type iterators should now work
Date: Fri,  3 Feb 2023 20:59:29 +0000	[thread overview]
Message-ID: <20230203205929.2126634-12-dhowells@redhat.com> (raw)
In-Reply-To: <20230203205929.2126634-1-dhowells@redhat.com>

DIO to/from KVEC-type iterators should now work as the iterator is passed
down to the socket in non-RDMA/non-crypto mode and in RDMA or crypto mode
care is taken to handle vmap/vmalloc correctly and not take page refs when
building a scatterlist.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Tom Talpey <tom@talpey.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
---
 fs/cifs/file.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index ed84104b669d..11875224a917 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3546,16 +3546,6 @@ static ssize_t __cifs_writev(
 	struct cifs_aio_ctx *ctx;
 	int rc;
 
-	/*
-	 * iov_iter_get_pages_alloc doesn't work with ITER_KVEC.
-	 * In this case, fall back to non-direct write function.
-	 * this could be improved by getting pages directly in ITER_KVEC
-	 */
-	if (direct && iov_iter_is_kvec(from)) {
-		cifs_dbg(FYI, "use non-direct cifs_writev for kvec I/O\n");
-		direct = false;
-	}
-
 	rc = generic_write_checks(iocb, from);
 	if (rc <= 0)
 		return rc;
@@ -4089,16 +4079,6 @@ static ssize_t __cifs_readv(
 	loff_t offset = iocb->ki_pos;
 	struct cifs_aio_ctx *ctx;
 
-	/*
-	 * iov_iter_get_pages_alloc() doesn't work with ITER_KVEC,
-	 * fall back to data copy read path
-	 * this could be improved by getting pages directly in ITER_KVEC
-	 */
-	if (direct && iov_iter_is_kvec(to)) {
-		cifs_dbg(FYI, "use non-direct cifs_user_readv for kvec I/O\n");
-		direct = false;
-	}
-
 	len = iov_iter_count(to);
 	if (!len)
 		return 0;


      parent reply	other threads:[~2023-02-03 21:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 20:59 [PATCH 00/11] smb3: Use iov_iters down to the network transport and fix DIO page pinning David Howells
2023-02-03 20:59 ` [PATCH 01/11] netfs: Add a function to extract a UBUF or IOVEC into a BVEC iterator David Howells
2023-02-03 20:59 ` [PATCH 02/11] netfs: Add a function to extract an iterator into a scatterlist David Howells
2023-02-03 20:59 ` [PATCH 03/11] cifs: Implement splice_read to pass down ITER_BVEC not ITER_PIPE David Howells
2023-02-06 15:48   ` Christoph Hellwig
2023-02-03 20:59 ` [PATCH 04/11] cifs: Add a function to build an RDMA SGE list from an iterator David Howells
2023-02-03 20:59 ` [PATCH 05/11] cifs: Add a function to Hash the contents of " David Howells
2023-02-03 20:59 ` [PATCH 06/11] cifs: Add some helper functions David Howells
2023-02-03 20:59 ` [PATCH 07/11] cifs: Add a function to read into an iter from a socket David Howells
2023-02-03 20:59 ` [PATCH 08/11] cifs: Change the I/O paths to use an iterator rather than a page list David Howells
2023-02-03 20:59 ` [PATCH 09/11] cifs: Build the RDMA SGE list directly from an iterator David Howells
2023-02-03 20:59 ` [PATCH 10/11] cifs: Remove unused code David Howells
2023-02-03 20:59 ` David Howells [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230203205929.2126634-12-dhowells@redhat.com \
    --to=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=jlayton@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=metze@samba.org \
    --cc=nspmangalore@gmail.com \
    --cc=rohiths.msft@gmail.com \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.com \
    --cc=tom@talpey.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).