From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B15E9C624D6 for ; Wed, 2 Sep 2026 17:37:17 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hZqg01bsCz2y2J; Thu, 03 Sep 2026 03:37:16 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1788370636; cv=none; b=k+NU8zgc84xfl5jFPmL1J22A64p2u6oVVmjlm8h9ePt52Whe/vPkjtgzO22tKW5BDrYFVfhGi5W8ld0IW/fJ6/FlvewXt7/xvIARPznnaGijm7BweEG5gRQmWA4uSwLYjtn0MdrJdddOB+56qar7fz8R3GI4xSLlxdXkzC4MJyZK0IYjR48m1Q9bAxRnwRcaoRBqIbv7UKh67FRg+2Clb6Rd6Q8Lej84JbKioQDRTPVMTUN2jDlzRA+v8QUUNXmaG0WKmO7/P4BG0OpvG5EBwig6VMwPmk6vd3wihdjFLt4MAIJXbkBFAWs0R30EVGl7ebgTCemh2zXygrvRS+H/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1788370636; c=relaxed/relaxed; bh=uz94seJkld4/VYmPIzePLWpyWumrSoaTR2JUNJSPhWI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=gwHGClKeXtAqc+LjHOpYYienHQ/zF8vzxWMRc+klDWKDG7F+d02FRSzSa5HQ8JHrryXQbeBhPlE3l4Ke6F6ie7jVgi5RpSYh5J7A9FjG/PbsPIK+FqU3VMbOngRbae3VrRKt8spYah3J0iM4xEtFqL5pfmhn1z2TO5r//6c/g1tgRomnIUn2RrY0I/5my+ha7VU4GfqdHFePvhq5/wojRKr6MGYwa+PPvOMeKVxtKmT7OrNJgPp4Fa5gX71dMQeWNctrgYc6z0DOWXTafHOX2b/f30ENJHb1AVMnjWFyTQH715dJgBsNLYxV0pG/c7NDZSdXmIioCjI2v8gH3XjfTg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Mv8RV65l; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RthAq5mg; dkim-atps=neutral; spf=pass (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=dhowells@redhat.com; receiver=lists.ozlabs.org) smtp.mailfrom=redhat.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Mv8RV65l; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=RthAq5mg; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=dhowells@redhat.com; receiver=lists.ozlabs.org) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4hZqfz1L78z2xl6 for ; Thu, 03 Sep 2026 03:37:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788370631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uz94seJkld4/VYmPIzePLWpyWumrSoaTR2JUNJSPhWI=; b=Mv8RV65lFXFqYjreTnIsXb4JT+zL7vTA3lt9mE29GkMmmfycApXyAWg4GF7GwGJRrC1V24 wVdjDIaVpHFzPRR9FY3c6owlhblfDVhVRLZVj7Ym9yiUDjuOcIUtClYXImgfHVVSm9pLMB 2CAjLhqH1q19pX2HgUUNCsWkb96fkkU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788370632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uz94seJkld4/VYmPIzePLWpyWumrSoaTR2JUNJSPhWI=; b=RthAq5mg+VDA0mPb835xYVt950EkGjHnm5sj8YskRJww+eAPyMdq2ezVBqFl/lYk/0pmkP yb/zf4JPcNCTjEizOe6SO9jbRg1N/D5iEDB/z1YxVybcGxu9BrpQz4dfrKk9mBd/ZAXY+3 XTrctBOyEMv6Ttxucuxsy12dpZtBDsc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-70-RNMDRcO6PZ2hsT40PdQEzQ-1; Wed, 02 Sep 2026 13:37:06 -0400 X-MC-Unique: RNMDRcO6PZ2hsT40PdQEzQ-1 X-Mimecast-MFC-AGG-ID: RNMDRcO6PZ2hsT40PdQEzQ_1788370623 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C1795192E24D; Wed, 2 Sep 2026 17:37:02 +0000 (UTC) Received: from warthog.com (unknown [10.44.32.158]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5DA331955F02; Wed, 2 Sep 2026 17:36:56 +0000 (UTC) From: David Howells To: Paulo Alcantara Cc: David Howells , Christian Brauner , Matthew Wilcox , Christoph Hellwig , Jens Axboe , Leon Romanovsky , Namjae Jeon , ChenXiaoSong , Marc Dionne , Stefan Metzmacher , Eric Van Hensbergen , Dominique Martinet , Ilya Dryomov , netfs@lists.linux.dev, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Shyam Prasad N , Tom Talpey Subject: [PATCH v11 22/36] smbdirect: Remove support for ITER_FOLIOQ from smbdirect_map_sges_from_iter() Date: Wed, 2 Sep 2026 18:33:34 +0100 Message-ID: <20260902173350.3468672-23-dhowells@redhat.com> In-Reply-To: <20260902173350.3468672-1-dhowells@redhat.com> References: <20260902173350.3468672-1-dhowells@redhat.com> X-Mailing-List: linux-erofs@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-MFC-PROC-ID: cQAD3xILv9r22gu99vKPkcyU6Nde-cKr-Qw11MMzqBo_1788370623 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true netfslib now only presents an bvecq queue and an associated ITER_BVECQ iterator to the filesystem, so it isn't going to see the ITER_FOLIOQ iterator. So remove that code. Netfslib also won't supply ITER_BVEC/KVEC iterators, though smbdirect might; further in future, it won't supply iterators at all, but rather a bvecq slice (that can be used to construct an iterator). Signed-off-by: David Howells Acked-by: Stefan Metzmacher cc: Paulo Alcantara cc: Namjae Jeon cc: Stefan Metzmacher cc: Shyam Prasad N cc: Tom Talpey cc: linux-cifs@vger.kernel.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org --- fs/smb/smbdirect/connection.c | 68 ----------------------------------- 1 file changed, 68 deletions(-) diff --git a/fs/smb/smbdirect/connection.c b/fs/smb/smbdirect/connection.c index f5e7e75dd809..f217cf127cf9 100644 --- a/fs/smb/smbdirect/connection.c +++ b/fs/smb/smbdirect/connection.c @@ -6,7 +6,6 @@ #include "internal.h" #include -#include struct smbdirect_map_sges { struct ib_sge *sge; @@ -2131,70 +2130,6 @@ static ssize_t smbdirect_map_sges_from_kvec(struct iov_iter *iter, return ret; } -/* - * Extract folio fragments from a FOLIOQ-class iterator and add them to an - * ib_sge list. The folios are not pinned. - */ -static ssize_t smbdirect_map_sges_from_folioq(struct iov_iter *iter, - struct smbdirect_map_sges *state, - ssize_t maxsize) -{ - const struct folio_queue *folioq = iter->folioq; - unsigned int slot = iter->folioq_slot; - ssize_t ret = 0; - size_t offset = iter->iov_offset; - - if (WARN_ON_ONCE(!folioq)) - return -EIO; - - if (slot >= folioq_nr_slots(folioq)) { - folioq = folioq->next; - if (WARN_ON_ONCE(!folioq)) - return -EIO; - slot = 0; - } - - do { - struct folio *folio = folioq_folio(folioq, slot); - size_t fsize = folioq_folio_size(folioq, slot); - - if (offset < fsize) { - size_t part = umin(maxsize, fsize - offset); - bool ok; - - ok = smbdirect_map_sges_single_page(state, - folio_page(folio, 0), - offset, - part); - if (!ok) - return -EIO; - - offset += part; - ret += part; - maxsize -= part; - } - - if (offset >= fsize) { - offset = 0; - slot++; - if (slot >= folioq_nr_slots(folioq)) { - if (!folioq->next) { - WARN_ON_ONCE(ret < iter->count); - break; - } - folioq = folioq->next; - slot = 0; - } - } - } while (state->num_sge < state->max_sge && maxsize > 0); - - iter->folioq = folioq; - iter->folioq_slot = slot; - iter->iov_offset = offset; - iter->count -= ret; - return ret; -} - /* * Extract page fragments from up to the given amount of the source iterator * and build up an ib_sge list that refers to all of those bits. The ib_sge list @@ -2225,9 +2160,6 @@ static ssize_t smbdirect_map_sges_from_iter(struct iov_iter *iter, size_t len, case ITER_KVEC: ret = smbdirect_map_sges_from_kvec(iter, state, len); break; - case ITER_FOLIOQ: - ret = smbdirect_map_sges_from_folioq(iter, state, len); - break; default: WARN_ONCE(1, "iov_iter_type[%u]\n", iov_iter_type(iter)); return -EIO;