From patchwork Fri Aug 23 16:12:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13775476 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 B3172C531DC for ; Fri, 23 Aug 2024 16:12:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3A5336B02BE; Fri, 23 Aug 2024 12:12:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 355596B02BF; Fri, 23 Aug 2024 12:12:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1F5796B02C0; Fri, 23 Aug 2024 12:12:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 016626B02BE for ; Fri, 23 Aug 2024 12:12:36 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A55991C66E7 for ; Fri, 23 Aug 2024 16:12:27 +0000 (UTC) X-FDA: 82484002734.08.94C15CB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf23.hostedemail.com (Postfix) with ESMTP id 503AA140006 for ; Fri, 23 Aug 2024 16:12:23 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AVwJu+SL; spf=pass (imf23.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=1724429504; 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=HWel4fAjhn1F/3o1FewTt4dI8XNtgDdoQ8ZZC3V8mew=; b=QxacJB00lfwQHvIiI1kwVDbff3dbQgtfHWO5GwbLWZHitbFqELheif/HfXvgXGYfzpxxty pARrBGYZZypGdxKC1g/EJ9ezkCFqBsiLOdbKWGzKgMabqs5deF6HMkHBpRKeritAT2Hg4v Xr0howKNtTE+aL+nb3fBkj5wEmzEZvQ= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=AVwJu+SL; spf=pass (imf23.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724429504; a=rsa-sha256; cv=none; b=k90vUL2NdIoDNyHMspyUbMq90vRsTCXrWZc3NNZkUnLohZJe98gr9FNrTnK5S0f3hXPM+d bnPhuKDpYyDnA9olt8TRDLgJXIgMsmWVmv2BXnt2goSJZMi5woNGFH55DezmEyQyBcJpG5 kYwCYX4kIzSk1081Rnm42kMNZXCKePw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724429542; 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=HWel4fAjhn1F/3o1FewTt4dI8XNtgDdoQ8ZZC3V8mew=; b=AVwJu+SL4XqgrOYdQ/5E0vIrGo17+bxTVgCaAgvcl8fP3+PHKzZidQtEY4cm9WNQZVXewl VmyVW4IUw+rmaojMFn4+sEd9UEozSsZ8DpLrExjUhSaIgMsWCuUeZdwEdse0u9xedWXvY3 rV9f46OyjGxFe7O/3d6AW+UTsA1HdxM= Received: from mx-prod-mc-01.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-173-pE1nOUCvOMGmvIxiOZwJjA-1; Fri, 23 Aug 2024 12:12:19 -0400 X-MC-Unique: pE1nOUCvOMGmvIxiOZwJjA-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6137B1954B06; Fri, 23 Aug 2024 16:12:16 +0000 (UTC) Received: from warthog.procyon.org.uk.com (unknown [10.42.28.30]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 047D71955F41; Fri, 23 Aug 2024 16:12:11 +0000 (UTC) From: David Howells To: Christian Brauner Cc: David Howells , Pankaj Raghav , Jeff Layton , Matthew Wilcox , 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-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] netfs, cifs: Further fixes Date: Fri, 23 Aug 2024 17:12:01 +0100 Message-ID: <20240823161209.434705-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 503AA140006 X-Stat-Signature: mim7f5qmpjo4m5si9um9q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mt7Mmei+aKyr69sOCsZlNZeG9CLBqoyy6dHXapgYwQMgLIbA+gHPvGUVTmo+jiVsn1NVOgZL5nRNOm+XHclZEUU3pxxWvtkOBd/QJdpQVAsImz9bySm8I8sDk3wgQ/f3WBoyYW6ckfGdDEdPhTShTlyCNKWaFhy9BfXW2qZD6GzBvFk/qhAnbP5AP6Nz2q31dr2RX9gkzsQ4LzBT2ZW9zjT/V6BdKHPrXxq6c0CHIvAcusEWg5CxxNLzLZp8XGlUAhUEJsh4cMe6rSivijP69zv5/g== 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 Christian, Steve, Here are some more fixes to cifs and one to netfs: (1) Fix cifs FALLOC_FL_PUNCH_HOLE support as best I can. If it's going to punch a hole in dirty data in the pagecacne, invalidating that data may result in the EOF not being moved correctly. The set-zero and the eof-move RPC ops really need compounding to avoid third-party interference. (2) Adjust three debugging output statements. Not strictly a fix, so could be dropped. Including the subreq ID in some extra debug lines helps a bit, though. (3) Fix netfslib's short read retry to reset the buffer iterator otherwise the wrong part of the buffer may get written on. (4) Further fix the early EOF detection in cifs read. (5) Further fixes for cifs credit handling. The patches can also be found here: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes Thanks, David David Howells (5): cifs: Fix FALLOC_FL_PUNCH_HOLE support netfs, cifs: Improve some debugging bits netfs: Fix missing iterator reset on retry of short read cifs: Fix short read handling cifs: Fix credit handling fs/netfs/io.c | 3 ++- fs/smb/client/file.c | 9 +++++++++ fs/smb/client/smb2ops.c | 34 ++++++++++++++++++++++++++++++---- fs/smb/client/smb2pdu.c | 12 ++---------- fs/smb/client/trace.h | 1 + 5 files changed, 44 insertions(+), 15 deletions(-)