From patchwork Wed Jan 3 14:59:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 18680 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5068416dyb; Wed, 3 Jan 2024 07:00:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGs5yTxy5MuHCtlPMHYA5QF6hS85OuLV8JXYU25Vk5oHgOh0ibEX6Kpxno+tTSOU6RK/84r X-Received: by 2002:ac8:578a:0:b0:427:fa8c:e6b4 with SMTP id v10-20020ac8578a000000b00427fa8ce6b4mr1674996qta.34.1704294017793; Wed, 03 Jan 2024 07:00:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704294017; cv=none; d=google.com; s=arc-20160816; b=NRcVMqXVfS5MOznGns1Cw6aE+ko3ONt8PKdpJZO4SZ5FleTNfZ9D4Z9LhFBtdG1pZo kMIURk2IGmoEJTtBQrKtrVzD48ovQgV4iTv0mb7vdzBuy+/RXVDCL6ZeiR4f9k/FduR5 6Cix7vHSbGAZhG3PTqFwfe9fKL2I0Urgy7GzOpwWPeUnyj8WqZBg+U/qNvh35PwD6vws kqaDa2ZOzdbiHobTfTvwtN9zTQfBHyubYTTvi7dcgAspETaVIeJ+1YKusoxpojuLWuXU QY34c+psN97pj6/E1CEvH86aIRn3xzkqEcXI9sKp7XzlKjSJAorE7SmXubypDxqWUNFu u5ZQ== 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=s3o3MrTd6nm5lawOB5Ax6jA2uuGzy36Eef5IBUe+5HY=; fh=wHeWnRAPvg2xJ56RgmOMhm93PiD0Bj1H5ZiEjecP7fw=; b=zH7f6ryDAKbQA9Tl5Qy8xe4/Rm7tF9FeUFb419Ka742xOGISn4HQ6AgDq+MiSs6pbB uTzup+u6ealTSaOmX/EsDi3yrwboDz+IpV8MciRR0vLPmvC1M4nbOgPhu814T2PCz/7I 3RCS+TrU0pOCryi8E+j+0+ZW9vaHhmwUY4pLGsxiGhFCRXVF5PC7GZThEdhwRnq4f5vG YKrevqpZmMJDo9GSfgInS4OCYKIt0MC3qjJWaQ9D8iDGFfoZznhnxuPYkIG6x1+dGqkk 3X18ceIogBjbeEh76oacX+rogfpazLq0GuWD0D3hD04s9o9lynLWvdLufzpHe7FL8s+Y RPtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AV+D26VQ; spf=pass (google.com: domain of linux-kernel+bounces-15673-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15673-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o2-20020ac85a42000000b0042818ece652si8188365qta.127.2024.01.03.07.00.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 07:00:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15673-ouuuleilei=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=AV+D26VQ; spf=pass (google.com: domain of linux-kernel+bounces-15673-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15673-ouuuleilei=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 377651C2364B for ; Wed, 3 Jan 2024 15:00:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2D221B28E; Wed, 3 Jan 2024 14:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AV+D26VQ" X-Original-To: linux-kernel@vger.kernel.org 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 EE0951A714 for ; Wed, 3 Jan 2024 14:59:47 +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=1704293987; 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=s3o3MrTd6nm5lawOB5Ax6jA2uuGzy36Eef5IBUe+5HY=; b=AV+D26VQILz2cOKMwox8g/2mhcRPhHN01nFPa87LciragtVm7beV/Cb+82LXtZIJUo+mWR Ti/UTs06ne1ObFBUECvgj4yAZnHFrHQipXq/CZc7ug1rKT9XXGNUKbD+p5NbRXwYGT/TP9 YsV63Pj61e2sdL6D7/GQHPGm9nKgznY= 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-298-3VxcmtpCOkq8GL6PiBMlJQ-1; Wed, 03 Jan 2024 09:59:43 -0500 X-MC-Unique: 3VxcmtpCOkq8GL6PiBMlJQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 4F93C83B821; Wed, 3 Jan 2024 14:59:42 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24175C15A0C; Wed, 3 Jan 2024 14:59:37 +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/5] netfs, cachefiles, 9p: Additional patches Date: Wed, 3 Jan 2024 14:59:24 +0000 Message-ID: <20240103145935.384404-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787081804068526552 X-GMAIL-MSGID: 1787081804068526552 Hi Christian, Jeff, Gao, Dominique, Here are some additional patches for my netfs-lib tree: (1) Fix __cachefiles_prepare_write() to correctly validate against the DIO alignment. (2) 9p: Fix initialisation of the netfs_inode so that i_size is set before netfs_inode_init() is called. (3) 9p: Do a couple of cleanups (remove a couple of unused vars and turn a BUG_ON() into a warning). (4) 9p: Always update remote_i_size, even if we're asked not to update i_size in stat2inode. (5) 9p: Return the amount written in preference to an error if we wrote something. 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 David Howells (5): cachefiles: Fix __cachefiles_prepare_write() 9p: Fix initialisation of netfs_inode for 9p 9p: Do a couple of cleanups 9p: Always update remote_i_size in stat2inode 9p: Use length of data written to the server in preference to error fs/9p/v9fs_vfs.h | 1 + fs/9p/vfs_addr.c | 24 ++++++++++++------------ fs/9p/vfs_inode.c | 6 +++--- fs/9p/vfs_inode_dotl.c | 7 ++++--- fs/cachefiles/io.c | 28 +++++++++++++++++----------- 5 files changed, 37 insertions(+), 29 deletions(-)