From patchwork Tue Jan 9 11:20:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13514772 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 D3152C46CD2 for ; Tue, 9 Jan 2024 11:20:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 092126B0071; Tue, 9 Jan 2024 06:20:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 041AC6B0074; Tue, 9 Jan 2024 06:20:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4B716B0075; Tue, 9 Jan 2024 06:20:45 -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 D70416B0071 for ; Tue, 9 Jan 2024 06:20:45 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 9EC45A01C6 for ; Tue, 9 Jan 2024 11:20:45 +0000 (UTC) X-FDA: 81659530050.04.EAC9FF1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id D364F80017 for ; Tue, 9 Jan 2024 11:20:43 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Xnl6G9gD; spf=pass (imf30.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.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=1704799244; a=rsa-sha256; cv=none; b=ya5wmlitmVNfXC6xYElzuJT3AMi7S1h9cQtWtkJwNGZw0eFo84qGXaLTZQQ23QlLqurZ8G oq1Q3Vx5KYjY1aluvFlvb+TMsxgzh/whQc6fXD9ec/S8pN40P6pRZ/zJkeObIk9Ds6p0Lb 3TQfrIyv6PDqkI+vvDE15cs+snrQJwI= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Xnl6G9gD; spf=pass (imf30.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.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=1704799244; 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=Q1rVQCIFdSKutS/VkuEkTryFHcPbkDTWRo3T0LrhEQg=; b=d5L7dL5z/2FHTVcVsS9sHWV4X8oZmj6yBPhklPXipnXmp8lm4MbNqGM8zq8yJIa3RLsQ6W yQdxDa8X7yafkiEgoR9R9cn4FVyVMVcAeoeb1WWGG5GLzHkdEsUbwOBLpCbh4/StjsrrvL jxNLqIOp9PfNJjJ226WnTSmTIBChqzQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704799243; 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=Q1rVQCIFdSKutS/VkuEkTryFHcPbkDTWRo3T0LrhEQg=; b=Xnl6G9gDwqI1x7XRutQrHuKn6YfoCC1S5xW9g1BGYSlaOKpOCCkJaXD9NOPCPXPE4eB7hi 86XnHIwLMLB+BNuMm+CQTvWB3X0EkUfecn3BNC9GIwf4YlexfVNmz6ohneH39nxoWR+m5r G6k+aNMH0XD0Z+v/UHdUf7fVO/QbV2I= 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-630-nW2fwlmkMRCP2_d0nfEeHQ-1; Tue, 09 Jan 2024 06:20:39 -0500 X-MC-Unique: nW2fwlmkMRCP2_d0nfEeHQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 CF8F085A588; Tue, 9 Jan 2024 11:20:38 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6A5A51E3; Tue, 9 Jan 2024 11:20:35 +0000 (UTC) From: David Howells To: Christian Brauner , Jeff Layton , Gao Xiang , Dominique Martinet Cc: David Howells , Steve French , Matthew Wilcox , Marc Dionne , Paulo Alcantara , Shyam Prasad N , Tom Talpey , Eric Van Hensbergen , Ilya Dryomov , linux-cachefs@redhat.com, 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, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/6] netfs, cachefiles: More additional patches Date: Tue, 9 Jan 2024 11:20:17 +0000 Message-ID: <20240109112029.1572463-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: D364F80017 X-Stat-Signature: b5fqj4i67og1sqtge15pxc5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5HiCaDGhp0z0rB9YW7LtGgEaiYCAVnq5iU/Gh17ZnUzgudTo+ziC5NMTjGrzCpVEm7qHbmx4khcX/amdKhQqDlScLJcbWxRDRtdJe4mU97bqO5kM6paPjtkv+ISnRyQKzOKO9YaiFqd9XMPD8NFl5paq0dbUJ674nag8nug4WMOYkyXa1cDzjl+7lZ2RU6GWu8U= 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, Jeff, Gao, Here are some additional patches for my netfs-lib tree: (1) Mark netfs_unbuffered_write_iter_locked() static as it's only used in the file in which it is defined. (2) Display a counter for DIO writes in /proc/fs/netfs/stats. (3) Fix the interaction between write-streaming (dirty data in non-uptodate pages) and the culling of a cache file trying to write that to the cache. (4) Fix the loop that unmarks folios after writing to the cache. The xarray iterator only advances the index by 1, so if we unmarked a multipage folio and that got split before we advance to the next folio, we see a repeat of a fragment of the folio. (5) Fix a mixup with signed/unsigned offsets when prepping for writing to the cache that leads to missing error detection. (6) Fix a wrong ifdef hiding a wait. David The netfslib postings: Link: https://lore.kernel.org/r/20231013160423.2218093-1-dhowells@redhat.com/ # v1 Link: https://lore.kernel.org/r/20231117211544.1740466-1-dhowells@redhat.com/ # v2 Link: https://lore.kernel.org/r/20231207212206.1379128-1-dhowells@redhat.com/ # v3 Link: https://lore.kernel.org/r/20231213152350.431591-1-dhowells@redhat.com/ # v4 Link: https://lore.kernel.org/r/20231221132400.1601991-1-dhowells@redhat.com/ # v5 Link: https://lore.kernel.org/r/20240103145935.384404-1-dhowells@redhat.com/ # added patches David Howells (6): netfs: Mark netfs_unbuffered_write_iter_locked() static netfs: Count DIO writes netfs: Fix interaction between write-streaming and cachefiles culling netfs: Fix the loop that unmarks folios after writing to the cache cachefiles: Fix signed/unsigned mixup netfs: Fix wrong #ifdef hiding wait fs/cachefiles/io.c | 18 +++++++++--------- fs/netfs/buffered_write.c | 27 ++++++++++++++++++++++----- fs/netfs/direct_write.c | 5 +++-- fs/netfs/fscache_stats.c | 9 ++++++--- fs/netfs/internal.h | 8 ++------ fs/netfs/io.c | 2 +- fs/netfs/stats.c | 13 +++++++++---- include/linux/fscache-cache.h | 3 +++ include/linux/netfs.h | 1 + 9 files changed, 56 insertions(+), 30 deletions(-) Tested-by: Marc Dionne Reviewed-by: Jeff Layton