From patchwork Wed Nov 29 16:56:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13473215 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45A2C4167B for ; Wed, 29 Nov 2023 16:56:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C56A6B03BB; Wed, 29 Nov 2023 11:56:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 675696B03C2; Wed, 29 Nov 2023 11:56:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58BC96B03C6; Wed, 29 Nov 2023 11:56:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 4A96C6B03BB for ; Wed, 29 Nov 2023 11:56:33 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 0FE511C058D for ; Wed, 29 Nov 2023 16:56:33 +0000 (UTC) X-FDA: 81511595466.25.873CD44 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 42FA24001D for ; Wed, 29 Nov 2023 16:56:31 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PDn1bH1b; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701276991; a=rsa-sha256; cv=none; b=h04C7aXa5dHmUplHQqovG26KyxT2Fu5wNdQ5t2+lOvsO0l5/PVdhKoo7bXJElzbV1rAxV5 kRhWL6/ENZMWz2fFRP4Q52bAgz0D5Xvd0F2EGQzM0qMAnsA6yKpTRP41qtUWFuFsF1VH3M 3Yza3f3piRaSYvzcvgVV1LNowp96uhc= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=PDn1bH1b; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701276991; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=mwPpdhlYYaHD0bYeEis0CU8df9ASTS3wuKo9KB9sGXI=; b=twG4BZ9CFB3eH2y8SnQBdDjmSr2zK/+MsfymgMheRGnNgcEBfdo+Ydy8+yH2K6BaGC21D6 fk+56rFT4nCdV9uXfPiHZwNCbP+HW1K5x7BwKopke0f1tx2Vyb7bgR9+udYLlpFchUgIOF OzQQl7Z1ncWvR1kSvvEFvyIWkO8dyZU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701276990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=mwPpdhlYYaHD0bYeEis0CU8df9ASTS3wuKo9KB9sGXI=; b=PDn1bH1bN0Tlwi8UVxl27x/26iAkhSoYl2xgql4kQed/MTxAxJK/YlH/OEKlqSdZCvrJkX lzGmwJGu1Dkxrl3QO8ySctLJhZsRmxSu1G8l/xX+l7CVVHCiWY4PNxkFQvnX6k3AflB1YQ y5Pq2ukqYe2EKam0HH+V+tJvEohcV/I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-15-LUmdmRd7NrCAEP8vXLpuJw-1; Wed, 29 Nov 2023 11:56:24 -0500 X-MC-Unique: LUmdmRd7NrCAEP8vXLpuJw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 16518185A794; Wed, 29 Nov 2023 16:56:24 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A1C51C060BB; Wed, 29 Nov 2023 16:56:22 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Shyam Prasad N , Rohith Surabattula , Matthew Wilcox , Jeff Layton , linux-cifs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 0/3] cifs: Fixes for copy_file_range() and FALLOC_FL_INSERT/ZERO_RANGE Date: Wed, 29 Nov 2023 16:56:16 +0000 Message-ID: <20231129165619.2339490-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 42FA24001D X-Stat-Signature: w4yhh1tqhkpqa7g9pizt8bx6rg8bcy33 X-HE-Tag: 1701276991-209283 X-HE-Meta: U2FsdGVkX1+XbAHtFd0QELlsI9j5aCibcK6l/sZfw9uBzPnMVtZyjVbe8H5cMFV1R7HKnqJodL3nNUAFxm6D7EoF6AyH8h/L5Mq6WMOOwonv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2vWL/hbcBq5ZeOqdByvhqh/9rlqwvh14CslPneJQt0F4c/sGoxxophlOHTC5wBBDlKp2rOznTM67n6Y2LHi0w3IX30Aw4pRaSHrCQWXX0XaZaJxugmOlP3zwe8a90dJQ1QQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi Steve, Here are three patches for cifs: (1) Fix FALLOC_FL_ZERO_RANGE support to change i_size if the file is extended. (2) Fix FALLOC_FL_INSERT_RANGE support to change i_size after it moves the EOF on the server. (3) Fix copy_file_range() support to handle invalidation and flushing of overlapping dirty data correctly, to move the EOF on the server to deal with lazy flushing of locally dirty data and to set the i_size afterwards if the copy extended the file. I've pushed the patches here also: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=cifs-fixes David David Howells (3): cifs: Fix FALLOC_FL_ZERO_RANGE by setting i_size if EOF moved cifs: Fix FALLOC_FL_INSERT_RANGE by setting i_size after EOF moved cifs: Fix flushing, invalidation and file size with copy_file_range() fs/smb/client/cifsfs.c | 80 +++++++++++++++++++++++++++++++++++++++-- fs/smb/client/smb2ops.c | 13 +++++-- 2 files changed, 88 insertions(+), 5 deletions(-)