Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp258304rdd; Tue, 9 Jan 2024 03:21:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHesDerGsf43go8NrBhRf78SQWx1XFg2pRYhrVB9qyxAWKgL/RGbS6ETTd9TprYmLskU/LM X-Received: by 2002:a05:6808:1807:b0:3bd:40d1:bcb3 with SMTP id bh7-20020a056808180700b003bd40d1bcb3mr270222oib.32.1704799264276; Tue, 09 Jan 2024 03:21:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704799264; cv=none; d=google.com; s=arc-20160816; b=qUSrYDBhCauZjX1TJk7YwAIXw4HQAXn3ymUAgOB5L9XZEH6XoqpPbqgclYRi8CX81Q 8ECMwNVjPCq+0xRKUeZo7CKJAWy2zugqe4plGYkMj953gq7O8MWDVuDjkHe7sHJd7F6F YaIbRPVLVXAzxTfrBiFxMzTrZ5azsD6qNysTjQj1Y/zZ2Rri4fthiWxzruW/jBZ9+Gvs Rhz6lVw66UmI82WQJecLunUa3wtAlBwDydFehotzq+SsxEXhjeAHTuRgjVh3u3ShmWKt +4ZxKKnhNI9Dz1jz4llCoUjxEi1ypwNs9cmmWJ2Ci1g8yg1TMWh9M5ecPMDFQ6aV79RY eGOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Q1rVQCIFdSKutS/VkuEkTryFHcPbkDTWRo3T0LrhEQg=; fh=wHeWnRAPvg2xJ56RgmOMhm93PiD0Bj1H5ZiEjecP7fw=; b=yU6V4GHD3AA7YNodl9AUJolMyguUHbImHSHzgazV1WxVvD/Y4H2zBdG9UOEecaUeep aRTgUwFbxq4t0HypVnjjpEi/KjKx8Db6tcFhIwtHmUqO9YnTh9E8xvLqhX8UW+WUs3dZ eCFlojhCOk4prUndSnVD7MMFrvpldp7Flzc5BpP+tLtUI+cHOU49YB2X0PX+0EYyBa+l KMqMh7JAStcHS3zwQKsS2GJIRrRwQ2utzfNZEKzzbgBRG1pWJ+4ZwWjRPJsYZJbtotmS jqBKaRJk54jPjoOnZC/Yl7ByJaiczqvvf4I2M9aEW6jfFgtc6asLF0yaZEQFH9T9ZhEV Uw5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VGC6x5Ee; spf=pass (google.com: domain of linux-kernel+bounces-20756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f12-20020a0ccc8c000000b0067f61c8fc66si2096250qvl.20.2024.01.09.03.21.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 03:21:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VGC6x5Ee; spf=pass (google.com: domain of linux-kernel+bounces-20756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 095661C23E70 for ; Tue, 9 Jan 2024 11:21:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ACFC3716C; Tue, 9 Jan 2024 11:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VGC6x5Ee" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E274936B1A for ; Tue, 9 Jan 2024 11:20:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704799241; 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=VGC6x5EeZJsGKGC+uYQdxt1uSOU61/t81KdfuQzwLfKLx2rxEOPdNKqqIkK/Ev+jQSiM1I 7PSVV9mZIowbSeEK2vVf0JHwtJ0PvnRLdaqM90nzxgGD7F9UaU+PND7eG3b8LB1VvmMTXs WYMzT9nFUlXfdcZ34Ll7YVU3Z68naFA= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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(-)