Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp713541rwd; Sat, 27 May 2023 05:28:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68+Qpj5Rydw5wgWB2vjO0oa64dxaw63OTGhla1GO4awDexym2/gpZ1e9AJNIH/PfMJ7XdH X-Received: by 2002:a17:902:e745:b0:1af:ccc9:ce5a with SMTP id p5-20020a170902e74500b001afccc9ce5amr6479712plf.24.1685190503982; Sat, 27 May 2023 05:28:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685190503; cv=pass; d=google.com; s=arc-20160816; b=MvgsWnwwluD/lHXgdx+TA6cGaq6m4OQnzDJMqOg9nerPM8pX3vogzt4ZR2vwfnIYl3 e9sM19EDMrDjdxEuO+9uF2UBfLT9A/2vU95G+eN0QVbspirSHoKub2gn2MxZSL99OBtJ AMmg/qZLXkaAtBksH0VJlTv4/QOFkh9+vpKIaNm5kQHzePabd17xrYsXiLhSPTMPpy7P 70xeBL4Lahvqn4Bftmtp38pKa8Mk6OtbGli83LzOMXsye++szHtW+GZCgt1geK5WRqmh Sya52LiklhyezUD4yLwRay4czuNXIXRL4Fab0VWqQaGP28WwnTFBHDq3SEKfYhgifZYR St7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=k53bNaCHg+WYrnuEYz4n7xSO1EeB/nZBSkS0KtMPTsU=; b=d19G+7e2eo8rwro7H4LQS0MVY4+ayyNUVmD+neZPVB3Anu2c2Yl3zYxuNcTGmRgK/0 wn6uzAGNZReuGdgfIcT80eKMmCVH4tr5f0Q3mFnZYc9QNrSReR0WgPqXw391z7D+QjTo 960oJkMJzjWUUk6XTBmk7e7Ps2kXj2gd9p3SQFmlzoLO9N6L3lt+3uMCM/Uvx1d4Ijla /tZ0uH23RFHAreQTaGBfJCyggS0j/mi6+NxEsIWupwYjdevxlFqGaDXYCY/6RXKlr5gL E8nZvEcAoeMFt800iiRQQmGHjUJ/VFuKkXo2/XPMbiih2ZVDU1Mb06aSWO6/18T+e6cp ExTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=mk+zsTnT; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c24-20020a170902b69800b001adb9d5e1d2si5977756pls.130.2023.05.27.05.28.00; Sat, 27 May 2023 05:28:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=mk+zsTnT; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232282AbjE0MVB (ORCPT + 99 others); Sat, 27 May 2023 08:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjE0MVA (ORCPT ); Sat, 27 May 2023 08:21:00 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2111.outbound.protection.outlook.com [40.107.102.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 905EAF7; Sat, 27 May 2023 05:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cY4S9yraUOv3WHc/hRmL248v1THImThq2cp2waGoOnswMx98JC1zBDmSsGs8Y6CkPbeUzV6ujCNQKglelghUuV0j1SDdIXXUSFb3M0JKa3cIQU7kzJghTxTaJZdSnx00TVmYhtttnmKMING+8pMKcL5bqfqRDPJyb/UI7wY9XHpnsYXvEI9uKPgSPD6vZ6iAKjnpAaJsnBCSqJt7PhV2bNYzl7d8kNbhshqogRKsBPGpL5zlaEXjAtlVjEZG1QVJDuURVcs6RgjOwimDSeZzlpzDnhf7Vbh+WkqYqpNk0AnxH7Z612eTzDYd2xYBWi8Q4Nm2xfwo4jjc4FWtHwWvpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=k53bNaCHg+WYrnuEYz4n7xSO1EeB/nZBSkS0KtMPTsU=; b=Cb2Bp5xE6Bqha5Skm/jJ1rW9bzeOPzpkedH/My6Jwth1Y2et4l1v+dVYmneeBlLmYnt4uXmWRXkyt0vKpy4pknxItfN+xlPBeL64mLksCv6q7kg7orlAON6l+q+rqY6u9F25lGwEuk0DV6abKt++re0gLmwm5ar/eQkpi5RyBnKsrKavA2gvlIuYb3UWNgP7ziWPnx4WKX4TpNgG0pX14zHyTkRi82TT/Ot5/ZeIsL8qmr+GtPeNXISWHQHGaqe9aNUT9LyQi87ePh+9VKCDhLeNkH/jn3qZk3OrTMSDpw+jafcbTWHkNVAUjR26XbuX2kYDP0HOmU0IwwAihmiTyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k53bNaCHg+WYrnuEYz4n7xSO1EeB/nZBSkS0KtMPTsU=; b=mk+zsTnTcMI39S3zjvB07th1fwCPwJoXRrxN1rMIOH6FWq02mhK95SNA15ZKlCioKQzssHMHY8yDeXEZfA/lp6ayhTgdl9QHYpuCR0bruqCrfi2ydjMKVNeeuc6sVhrVnK5g6gXvwYyr2dKz1czhQXjWc3jS0gWFkuCgVVEu42U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SJ2PR13MB6143.namprd13.prod.outlook.com (2603:10b6:a03:4f5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.19; Sat, 27 May 2023 12:20:54 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::5e55:9a39:751f:55f6%3]) with mapi id 15.20.6433.018; Sat, 27 May 2023 12:20:54 +0000 Date: Sat, 27 May 2023 14:20:46 +0200 From: Simon Horman To: David Howells Cc: netdev@vger.kernel.org, Herbert Xu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-crypto@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jeff Layton , Steve French , Shyam Prasad N , Rohith Surabattula , linux-cachefs@redhat.com, linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH net-next 1/8] Move netfs_extract_iter_to_sg() to lib/scatterlist.c Message-ID: References: <20230526143104.882842-1-dhowells@redhat.com> <20230526143104.882842-2-dhowells@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230526143104.882842-2-dhowells@redhat.com> X-ClientProxiedBy: AM0PR04CA0048.eurprd04.prod.outlook.com (2603:10a6:208:1::25) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SJ2PR13MB6143:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a2b2c9e-1703-484f-3077-08db5eacd16c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gnQJUwfhWb/6yyHot4adOrlymOrpRdyALlTpKkHNw0L5hGfD64UqALPIfDNR6qnTlReIBXaLUdBFHiUd6nLefz3RmevdwCCZzXOxbVgZB+v+9hOIwGINzawt2LwHW+QNdgbhUHfeNxy1qZrBqIUrj/zMEQ0Joze0I26MxgRJua1VyNbmtmCx190LwSlmN32NyLCwF5WgJsdaf9dbfoNtcW0kUoQ2if5G+FLKwL+K1aBx9UqdNOptrexuIRJ67/zdhNep82ayhupESnbDI45Z2PIV8BIOcR1AkMhAVtTPWvreuEEpeuXAOl0NBens6slHYI6q+19fqD3aYY6Fk8yTyMfy/l+Cj2z+H0+keXWBwvNsVfjNY1p3O58FJVRteCzw9N7Iu+eUoxiaRg2yQkIMfxdHpk5VcGxwkrTkzIYhuWm6YdKDU8VfPo9B4qaBySDfYFdgMQ27FjU1z37GOMiPU0zaIsxYQm76Sk2aY0n0VFxIHvYm1aQO03KSLBR7lmWNrkSAyH6bsDT+byMo/DXfLpLnaO1FXgDWiQE611U+fWW99haU0kQTzPnIxjkMHntU X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39830400003)(366004)(396003)(136003)(346002)(376002)(451199021)(4326008)(86362001)(36756003)(186003)(8676002)(8936002)(41300700001)(83380400001)(6512007)(6506007)(2616005)(7416002)(5660300002)(54906003)(478600001)(6916009)(66946007)(66476007)(66556008)(316002)(6486002)(6666004)(38100700002)(44832011)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?k5f0cerJ30/hXpQz2q12q1QpqrKX/KBfnbgRDORHvUewXNM5RmdqdRQg2Hbn?= =?us-ascii?Q?/Ha485msQpZxB/WWJg1gh12VJAPyhLYawBCE7MGwnM3YfUnZBEGpWjVsQuTZ?= =?us-ascii?Q?/Qv/sqCQhJleQ+rZvyiw+E/AMfivjIX4vPLB4vLU+qpOuFhF9PwDZn+ox0LH?= =?us-ascii?Q?6NcnPUaGJvHCUU7aogUovg09ylYUbTRFJ/RkIn3OsesNRmNZPHHXdnR97kaX?= =?us-ascii?Q?lP4y8qnF7B47ekLVIMg7M104tHP1BxcsGP6ZuLrvWmpNIOl1/k4/eI5/vuhy?= =?us-ascii?Q?k5bB8P/Iz3c5mq7nTjLD3Sf/9ZLvuwMxZOP/xaqXldiMyzP/06wtSpjoTUy9?= =?us-ascii?Q?wf6MwsgnukoQLd6OfnGXqT8iw/qWDzizrY0K6ZeH3VS0HaMDHweQSNpHW6fx?= =?us-ascii?Q?YbQ1T9XQeuD3OP1HBiDZtLEGek9USF47aDp1BLSZRgOr5/vnKv/cnPAqzEP8?= =?us-ascii?Q?JuRBXXfRw1rhopnLqzo1so83K0L3Or+Zgr1IOzy1Gfb4RhSZxhRWnWTEeRkD?= =?us-ascii?Q?s/4mxuf9+7qV8AkdAnSgNVdVVigE7R5iT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W21R/NlYVtsnfd5Zd20V9O4L0N4XnHzy2steFpwykcXqAb?= =?us-ascii?Q?0IyGaifUL/BbUuih7yDDcAFpstJmv0Orvb5RVOW3Mssw37xDIsKOaHD6n6j8?= =?us-ascii?Q?L2dxNkPprEyqVgXvyeX5I23C7ansEOGT2yxFE1kfBjGtJoKpVWVpD+i/Lt8s?= =?us-ascii?Q?o1TWEn99DqNi00m3fmPLMqk8ywhkZCZUV2Jav9E4txLTH7t7wKwUZKROGMPK?= =?us-ascii?Q?rOiJvA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a2b2c9e-1703-484f-3077-08db5eacd16c X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2023 12:20:54.5261 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Qif1qLOblT+2Rt+zeOY2vOcnWyv8g80QjRNKwzZ+GNdgt14Epf0u0eDelBDo8YJxlyg8lzsZyOv9Bb+5JFGuWEN0Wwm8hqdIIIF1MxNTQ3U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR13MB6143 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, May 26, 2023 at 03:30:57PM +0100, David Howells wrote: ... > +/** > + * netfs_extract_iter_to_sg - Extract pages from an iterator and add ot an sglist > + * @iter: The iterator to extract from > + * @maxsize: The amount of iterator to copy > + * @sgtable: The scatterlist table to fill in > + * @sg_max: Maximum number of elements in @sgtable that may be filled > + * @extraction_flags: Flags to qualify the request > + * > + * Extract the page fragments from the given amount of the source iterator and > + * add them to a scatterlist that refers to all of those bits, to a maximum > + * addition of @sg_max elements. > + * > + * The pages referred to by UBUF- and IOVEC-type iterators are extracted and > + * pinned; BVEC-, KVEC- and XARRAY-type are extracted but aren't pinned; PIPE- > + * and DISCARD-type are not supported. > + * > + * No end mark is placed on the scatterlist; that's left to the caller. > + * > + * @extraction_flags can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA > + * be allowed on the pages extracted. > + * > + * If successul, @sgtable->nents is updated to include the number of elements Hi David, I know you are just moving things about here. But if you need to re-spin for some other reason, perhaps you could correct the spelling of successful. > + * added and the number of bytes added is returned. @sgtable->orig_nents is > + * left unaltered. > + * > + * The iov_iter_extract_mode() function should be used to query how cleanup > + * should be performed. > + */ ...