Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1426923pxb; Wed, 6 Apr 2022 18:43:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfyyNYPG+2LFbfRDZjMvhGpPYxYHhpodSIUu+BHC4gf7Qk1Eu66Pws/rQwdZcs6dUo4sbG X-Received: by 2002:a17:902:708b:b0:156:1a0a:5c3d with SMTP id z11-20020a170902708b00b001561a0a5c3dmr11482163plk.18.1649295801020; Wed, 06 Apr 2022 18:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649295801; cv=none; d=google.com; s=arc-20160816; b=lwUSPSe5e8c3GkNC68j6BQVOIO1kgE1WjlynsShtUKRs6QzOZ/rrtF4nHsJjOVm2Qn b8Pzdrks31bnxXx6YhgrHXZYmlZtkO/b35XLm1QmJkq6iPbTJ19+lmNzFA+BC0HABgbN Hp/fMCKwvDk1HtGAOa1CR1uGapuW70tR/sRiDg/bkMoyqvVFHEHo17c1hPmzBl/AtHh8 S1vTg3eM7ZxcNeK2VKq3V97F/Dx8Nn+Wj1owmEsXoxkl5xQnDNV3AbRXO4fqbrbzKX6D M2xwimbLxdiElWWN+yFmEYc59PJE9f90ordhCjQrHjMq0eFbgLZ5DFrP58Ai2l44CNuZ FN9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=TVUTDEn4ajQnJg0xbfI7sdT5Px6RGo8oRV8kyeHSPWk=; b=tddSYDFBx1CTqHWUh4eV3rKvOQcDBIgK9AFuRf//N1RbYmRXw/uaG3mqiM6AxtcTim dga3UpOwmn+s+SeitYpyX73Sdt3xYHTh2sVpURP+ZkuJGpjJ95b1Y0mcEJEJe4O70FOP uHhDT/qpXcY+hrRMmPPNTIsQxfumF5MkMayvhUucDnYwJ14uc1FHhokrqlP+SIK+GhlT H7GUVDjj0b1pupBFZyML3LqO1N42m2IE5aoeT/YeOcGSM44qPEYCrobGzF9d0A7e3s// W82NH73dsI9mhhKO/KTqgqjiUgJqw4P/kUlXowdSiejEsWCOhMNWyVohAkWabdUBS5e/ yTUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="J/o+0oN8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a63fb0f000000b003984299e83fsi18264752pgh.474.2022.04.06.18.43.06; Wed, 06 Apr 2022 18:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@redhat.com header.s=mimecast20190719 header.b="J/o+0oN8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237480AbiDFXFA (ORCPT + 99 others); Wed, 6 Apr 2022 19:05:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237483AbiDFXE6 (ORCPT ); Wed, 6 Apr 2022 19:04:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 860B4EB084 for ; Wed, 6 Apr 2022 16:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649286179; 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; bh=TVUTDEn4ajQnJg0xbfI7sdT5Px6RGo8oRV8kyeHSPWk=; b=J/o+0oN8j3CbsvJR2MrPYBM1skwLPUSc/9ri98UIFI2xoqytUVMNTw1fS0AiRP1yKmkzKb A2dAa1UPP3tP0W9J/IjDxeoTzdBIaZlDTdJvCCjccpu9/fWBaLHoleIZq9cBIPPDzFZSh4 fo3vtf9kbOdXWE9ZJrkvfQ8NBqQqgIc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-554-kFMLqPKjMCOt5JMsgkA9fg-1; Wed, 06 Apr 2022 19:02:58 -0400 X-MC-Unique: kFMLqPKjMCOt5JMsgkA9fg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DAA103C00135; Wed, 6 Apr 2022 23:02:41 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.37.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EFCC2024CBB; Wed, 6 Apr 2022 23:02:31 +0000 (UTC) Subject: [PATCH 00/14] cifs: Iterators, netfslib and folios From: David Howells To: linux-cachefs@redhat.com Cc: Matthew Wilcox , linux-cifs@vger.kernel.org, Shyam Prasad N , Steve French , Rohith Surabattula , dhowells@redhat.com, Steve French , Shyam Prasad N , Rohith Surabattula , Jeff Layton , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Date: Thu, 07 Apr 2022 00:02:30 +0100 Message-ID: <164928615045.457102.10607899252434268982.stgit@warthog.procyon.org.uk> User-Agent: StGit/1.4 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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-kernel@vger.kernel.org Here's a set of patches to make the following changes to the cifs filesystem driver: (1) Convert cifs to use I/O iterators to pass data/buffers from the the VM interface layer down to the socket rather than passing page lists about. (2) Convert cifs to use netfslib for buffered and direct read operations. (3) A partial conversion to folios. This branch is built on top of my netfs-lib branch[1]. The patches can be found here also: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=cifs-experimental David Link: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-lib [1] --- David Howells (14): cifs: Add some helper functions cifs: Add a function to read into an iter from a socket cifs: Check the IOCB_DIRECT flag, not O_DIRECT cifs: Change the I/O paths to use an iterator rather than a page list cifs: Remove unused code cifs: Use netfslib to handle reads cifs: Share server EOF pos with netfslib netfs: Allow the netfs to make the io (sub)request alloc larger cifs: Put credits into cifs_io_subrequest, not on the stack cifs: Hold the open file on netfs_io_request, not netfs_io_subrequest cifs: Clamp length according to credits and rsize cifs: Expose netfs subrequest debug ID and index in read tracepoints cifs: Split the smb3_add_credits tracepoint mm, netfs, fscache: Stop read optimisation when folio removed from pagecache fs/afs/file.c | 1 + fs/afs/inode.c | 1 + fs/afs/internal.h | 2 + fs/cifs/Kconfig | 1 + fs/cifs/cifsencrypt.c | 40 +- fs/cifs/cifsfs.c | 11 +- fs/cifs/cifsfs.h | 6 +- fs/cifs/cifsglob.h | 53 +- fs/cifs/cifsproto.h | 13 +- fs/cifs/cifssmb.c | 252 +++-- fs/cifs/connect.c | 18 +- fs/cifs/file.c | 2096 ++++++++++----------------------------- fs/cifs/fscache.c | 120 +-- fs/cifs/fscache.h | 70 -- fs/cifs/inode.c | 22 +- fs/cifs/misc.c | 109 -- fs/cifs/smb2ops.c | 387 ++++---- fs/cifs/smb2pdu.c | 85 +- fs/cifs/smb2proto.h | 2 +- fs/cifs/trace.h | 151 ++- fs/cifs/transport.c | 41 +- fs/netfs/internal.h | 1 + fs/netfs/io.c | 7 +- fs/netfs/misc.c | 13 +- fs/netfs/stats.c | 9 +- include/linux/fs.h | 2 + include/linux/netfs.h | 1 + include/linux/pagemap.h | 1 + mm/filemap.c | 15 + 29 files changed, 1203 insertions(+), 2327 deletions(-)