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 54E80C55ABA for ; Tue, 4 Aug 2026 10:05:11 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4hDq0j5kdLz309w; Tue, 04 Aug 2026 20:05:09 +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=1785837909; cv=none; b=ae/kPbbq5sk3zfRBQ9CUSfzTUQu9Z1p/Akl6Hf5RTC6sXuNQbQhq+UmB4rNQbgKyiba31hP5297luMSVNS9oP3q4rpWc+cbErJSC4PmLORfZZobOXGiKyo0iYKH0KRZCtbJmo1yACsTdIOJW+trUwXOrXn9NqBpsKg7CsVopaf9op57EcUm8KxTskoXJZB3zuOfydfHx95pMDmorBJUtpyHSdtd7JsNvN/yZEr8/UH5dLvoZp8MBn9IYyz2tJm+hBNpkwRx7frcv7CQ2P/rT0dBIOwPeni3THlQebFVXizHBbesRNCpbl4lYxJsI87+K9JhCtU7WOmiXOvgcwltk/w== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1785837909; c=relaxed/relaxed; bh=3RLUsXNrqEFA9AsI6Bz/RMT6tC6+vpBaTozDF4VmJDk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:content-type; b=nxRG9HolAlTwBKV1ELdLDJg0EyY1ZFflAdCKNeRZ2YXGfwEVGbPS6Ad41Ir6bZ238AGx/qE2UpeCZGfMD04wIop5WMmWHVpb9ydPZm7GTCpxen/YziPJK7/1ciVHiFvtMzNcNkFEKG4mMmDzACPqCHgeed6dIQxK+4LJU6+twk134KaIHGSq0SD9dbxTvz9pG8ftZI3ia0R+2jyIbwXKV7rEFta9ZckprCpftNjIwDJEMwhse5Y4VHmoqzpEPVjpoPSrrbKkx0PEqpVSeiPwUGTg6L8dKcM6LYSQII53CUwISPmj3Av7g2mbDNeN3gdreRc1hCYNjtvH+wJsKUeHOw== 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=Zc4HTmsc; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Zc4HTmsc; 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=Zc4HTmsc; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Zc4HTmsc; 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 4hDq0h6g4Cz308j for ; Tue, 04 Aug 2026 20:05:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785837906; 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=3RLUsXNrqEFA9AsI6Bz/RMT6tC6+vpBaTozDF4VmJDk=; b=Zc4HTmsc7n7DszxHBgZvOwBpz1dXBwDNH1eqPr6icdmNQfEaTEsdyv2CCeNTvLLxe5x/WE 7V4lcfZ3AtjAsepe3eLADuSQia4KoUYtInnfwwrV5wvR+k69JEGVKPF6PjunzhGptX3FQt bFlBR8/YE/UP2LWUjiIhv2M55Ort3hQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785837906; 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=3RLUsXNrqEFA9AsI6Bz/RMT6tC6+vpBaTozDF4VmJDk=; b=Zc4HTmsc7n7DszxHBgZvOwBpz1dXBwDNH1eqPr6icdmNQfEaTEsdyv2CCeNTvLLxe5x/WE 7V4lcfZ3AtjAsepe3eLADuSQia4KoUYtInnfwwrV5wvR+k69JEGVKPF6PjunzhGptX3FQt bFlBR8/YE/UP2LWUjiIhv2M55Ort3hQ= Received: from mx-prod-mc-03.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-50-hxsCrY_lP8Ssu_hA149lSQ-1; Tue, 04 Aug 2026 06:05:02 -0400 X-MC-Unique: hxsCrY_lP8Ssu_hA149lSQ-1 X-Mimecast-MFC-AGG-ID: hxsCrY_lP8Ssu_hA149lSQ_1785837899 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 430041956052; Tue, 4 Aug 2026 10:04:59 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.44.32.44]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DA810423; Tue, 4 Aug 2026 10:04:52 +0000 (UTC) From: David Howells To: Christian Brauner , Matthew Wilcox , Christoph Hellwig Cc: David Howells , Paulo Alcantara , Jens Axboe , Leon Romanovsky , Steve French , 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 v8 17/25] smbdirect: Remove support for ITER_FOLIOQ from smbdirect_map_sges_from_iter() Date: Tue, 4 Aug 2026 11:02:12 +0100 Message-ID: <20260804100224.2748935-18-dhowells@redhat.com> In-Reply-To: <20260804100224.2748935-1-dhowells@redhat.com> References: <20260804100224.2748935-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.6 on 10.30.177.95 X-Mimecast-MFC-PROC-ID: Ce4Wgyt3w5Da7anmptZyCjddF_-i0OJpwj8e9NuagKg_1785837899 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: Steve French cc: Paulo Alcantara 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;