Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1007004rdb; Mon, 19 Feb 2024 00:38:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6fjbhDKbOT5J/P++dHmHf3MvuoDGSEqBPBMb8+lOup0I/fP2Le027kUDgbBuybNFgDkZGdM01VrFa6ajhn+A268KAdAkvVxtRf/jw1Q== X-Google-Smtp-Source: AGHT+IHba4rTCgK3VwpxqQQ4pJ8TXJWXTtQuFSgHGbm6+fO+zRO14CvHQTfH4+qOHU27Y+QZLu/T X-Received: by 2002:a05:6871:60e:b0:21e:d9bf:521e with SMTP id w14-20020a056871060e00b0021ed9bf521emr2289678oan.42.1708331938189; Mon, 19 Feb 2024 00:38:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708331938; cv=pass; d=google.com; s=arc-20160816; b=QAWSeUbA4KAt2XOuN8gee94d1/G1KS8nojgqo19xKe1q1vDkftTXzg8M1dBArnf3/g TC72EukRBtqFE8LdwQtyrASI6LWmCzNacU1nKwI0RjTIa072QlLWgAXXrI9QZN/VMWmj 4C+UWir+z6BZPbVWDZ1Zz3Kxnx6nJjJUlj71+o1WY8uVd0jtK6TnjF42R4aD7k0Z5evT oxZJZ/gFut2rcSHFSxNkQj6u/aniZD0yjpMufYe7pGn+spusGjO+oIrN9uLVfWbY0MuU IIsMBu7SyMBMoUtyKElIcegWsFFyGQNlbkek3gIrr2IzqoXJFxM1sL9xyv6UvpVtJDjJ n+tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:reply-to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id; bh=XBHqtPAKNYUYzMJHrWwhCmXJHEU5iVucjs5W72Gwklc=; fh=8HQWDUf+nRzwU6AQO9tLVohsv6lWJW81KMprQzhQUhg=; b=ndegnqQn28gSvVsIUpLGPQcv1DZR0SCRSrmHK+aSE+6Es7bDhxEGHavD6Qrqa0/DOa NrM/wNiaAvXyegLpAaJwM5DwQ5kpq+FyowWY0/7tq18+Wb2wEeUlmN166PTDmTOy6sVq bk7b99C4VaZp3ECOJQCpd8gxCqfiOQ+IBageqGZy3MmPdVi+qv/HLTk1v48eP2fthc1c MUH/Euj2OnzmQf8IreawnQPsUGwGSyRdO8jrYRhh6S46EsqdtBmVr+htn9cMUmCN+eCD 0NSIZCONohRssVUa7MV1bUrohYP7m9HPI9uw0k7Bb5mdRnvvM/8NFcYr6NntnRZxr5Sd mfKA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=leemhuis.info); spf=pass (google.com: domain of linux-kernel+bounces-70946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70946-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y22-20020a63b516000000b005e2b3b075cdsi1296442pge.403.2024.02.19.00.38.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 00:38:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=leemhuis.info); spf=pass (google.com: domain of linux-kernel+bounces-70946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70946-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DC6692823E3 for ; Mon, 19 Feb 2024 08:38:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C802B2232B; Mon, 19 Feb 2024 08:38:41 +0000 (UTC) Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) (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 1B05E208B9; Mon, 19 Feb 2024 08:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.237.130.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708331921; cv=none; b=Af50z4cL+RdoRQr4a5t79aWrgVjRKWLdqXu8Yd4z2+Mhh4AaxCLs2tJgX0ifYkXhWV7/+NWsxccVoOLMR4nXmSuDrWl1bQHbhCpad6WSpT/Xo/bEfETMAitYMHTIP0OboSglxgFpc+TGpK0E4lvi5gvTCblSD+K9GDJJ3AUIQq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708331921; c=relaxed/simple; bh=dAs2OALmkNudBmi4/5a+XrcRC0uaaEkJeqpRp/lL8ZI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qZT1BpEGH/bKGTW51pnWYOkYoNYE7zS0VJ/RVRtiD4h/RboYyv76O0uxOMpHZQpMGfwbifulXMPDKfbcn7rOySnBTqZea+LsKc3/M/VDsQPfE3nWkpFJntknPNUFPsuDxFg/OteZOodVvk2zpkwFZsAn6b6XcKaPhIFWKmBvF/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=leemhuis.info; spf=pass smtp.mailfrom=leemhuis.info; arc=none smtp.client-ip=80.237.130.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=leemhuis.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=leemhuis.info Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1rbzAY-0007jO-Uv; Mon, 19 Feb 2024 09:38:35 +0100 Message-ID: <960e015a-ec2e-42c2-bd9e-4aa47ab4ef2a@leemhuis.info> Date: Mon, 19 Feb 2024 09:38:33 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: Linux regressions mailing list Subject: Re: [PATCH 2/2] netfs: Fix missing zero-length check in unbuffered write Content-Language: en-US, de-DE To: David Howells , Christian Brauner Cc: Eric Van Hensbergen , Dominique Martinet , 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, linux_oss@crudebyte.com, Linux kernel regressions list References: <20240129094924.1221977-1-dhowells@redhat.com> <20240129094924.1221977-3-dhowells@redhat.com> From: "Linux regression tracking (Thorsten Leemhuis)" In-Reply-To: <20240129094924.1221977-3-dhowells@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1708331919;be4d50cb; X-HE-SMSGID: 1rbzAY-0007jO-Uv On 29.01.24 10:49, David Howells wrote: > Fix netfs_unbuffered_write_iter() to return immediately if > generic_write_checks() returns 0, indicating there's nothing to write. > Note that netfs_file_write_iter() already does this. > > Also, whilst we're at it, put in checks for the size being zero before we > even take the locks. Note that generic_write_checks() can still reduce the > size to zero, so we still need that check. > > Without this, a warning similar to the following is logged to dmesg: > > netfs: Zero-sized write [R=1b6da] > > and the syscall fails with EIO, e.g.: > > /sbin/ldconfig.real: Writing of cache extension data failed: Input/output error > > This can be reproduced on 9p by: > > xfs_io -f -c 'pwrite 0 0' /xfstest.test/foo > > Fixes: 153a9961b551 ("netfs: Implement unbuffered/DIO write support") > Reported-by: Eric Van Hensbergen > Link: https://lore.kernel.org/r/ZbQUU6QKmIftKsmo@FV7GG9FTHL/ David, thx for fixing Eric's regression, which I'm tracking. Christian, just wondering: that patch afaics is sitting in vfs.netfs for about three weeks now -- is that intentional or did it maybe fell through the cracks somehow? > [...] Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr If I did something stupid, please tell me, as explained on that page.