From patchwork Fri Dec 1 00:21:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13475213 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 CFF6EC4167B for ; Fri, 1 Dec 2023 00:22:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 52D9F8D005C; Thu, 30 Nov 2023 19:22:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DD238D0001; Thu, 30 Nov 2023 19:22:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CC098D005C; Thu, 30 Nov 2023 19:22:14 -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 29AA18D0001 for ; Thu, 30 Nov 2023 19:22:14 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 002B41A017E for ; Fri, 1 Dec 2023 00:22:13 +0000 (UTC) X-FDA: 81516347346.11.E1E2765 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf17.hostedemail.com (Postfix) with ESMTP id 4F43A4000E for ; Fri, 1 Dec 2023 00:22:12 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Sxb5AtUJ; spf=pass (imf17.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701390132; 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=0zKFElyLnd/c3LCDl+o0d2JWbeCKrzkMuVD1x9/nP0A=; b=QSEjxxKcR3EnIHjKIzkuTV9cS/qcdV5Et17EBJKepPyve/yLzOhhZSBbi9CDRcsTCfAySP wYsHl6DGyJ2Ulwx1wL0QhTqUuFnT8ir838xa4zncJB0Fq8248iAHrcx3yCyWc6FN07Wz8b 5PqTeT2tgEgv9WMBw7IibumTNxD8EEg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701390132; a=rsa-sha256; cv=none; b=RMpUZ1KqBYrCyeTVkPIJqTQP3jBScC1Lvf9qpVwvXfdxFbDC5g1Ab3xoBfOH3XomcARPR1 YRLUPj+G8FypxS9QGljYnlczMtWdMtMEM41d+kPkAjLEYlGPeSR/ythqCS6X9kxIcbntNv 47MytHGP4OXK4EuEEhcwHbrowr4ZJ1g= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Sxb5AtUJ; spf=pass (imf17.hostedemail.com: domain of dhowells@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701390131; 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=0zKFElyLnd/c3LCDl+o0d2JWbeCKrzkMuVD1x9/nP0A=; b=Sxb5AtUJkhiAsPp+fSrofNP+D3sC/kWArwurW1upCQwjNL3pL99K7OlP+jV5qHEk7GXoaW ZFGT8385X2hSoIZhh5Thrjlb+WjVQ+R/3TIH0mZLC4NEk4HIfMo04hg4XPXQf9VVHFTUtu mLo4rniMpR4nmX+6BFcxk8eirtNCT0A= 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-547-xWcjLnFuNKiizn4o9Zd-4Q-1; Thu, 30 Nov 2023 19:22:08 -0500 X-MC-Unique: xWcjLnFuNKiizn4o9Zd-4Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 52A8B811E7B; Fri, 1 Dec 2023 00:22:07 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2A7740C6EB9; Fri, 1 Dec 2023 00:22:05 +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/2] cifs: Fixes for copy_file_range() and FICLONE Date: Fri, 1 Dec 2023 00:21:59 +0000 Message-ID: <20231201002201.2981258-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Rspamd-Queue-Id: 4F43A4000E X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 4n513bg11hkwbyjga85ifutof9tnxxp1 X-HE-Tag: 1701390132-398215 X-HE-Meta: U2FsdGVkX19GAfTeu8YTvO4WJPmrnANIf9oQFq8o07HzrJD2uVc5l0DD6AAtLXAcLWvI88k4Y3aK/D+EdWm1A/hfLvTLnXRcmb8XzAQCO06WJAURYQJC3YJE0Kn7h1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joWE5zHUx5WDq48P6EF1BI3y9i9Tapci5vxDJJtPH0N8GnJpp2uC6mTQ+YwgCqKcugdHx25+sv8WfZ/ydOOhrd8xo/D0hmm7r4Bm2Vun+v32WdABycKvG5Y= 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 two patches for cifs: (1) 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. (2) Fix FICLONE which has the same set of bugs as (1). 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 (2): cifs: Fix flushing, invalidation and file size with copy_file_range() cifs: Fix flushing, invalidation and file size with FICLONE fs/smb/client/cifsfs.c | 170 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 156 insertions(+), 14 deletions(-)