From mboxrd@z Thu Jan 1 00:00:00 1970 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 B42FFC43334 for ; Fri, 1 Jul 2022 14:30:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4505E6B0071; Fri, 1 Jul 2022 10:30:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D6F46B0073; Fri, 1 Jul 2022 10:30:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 278196B0074; Fri, 1 Jul 2022 10:30:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 14FAC6B0071 for ; Fri, 1 Jul 2022 10:30:56 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D04073519A for ; Fri, 1 Jul 2022 14:30:55 +0000 (UTC) X-FDA: 79638767670.31.F0F7C40 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by imf09.hostedemail.com (Postfix) with ESMTP id 3A4BF140048 for ; Fri, 1 Jul 2022 14:30:55 +0000 (UTC) Received: by mail-pg1-f182.google.com with SMTP id e132so2558901pgc.5 for ; Fri, 01 Jul 2022 07:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:cc:references:in-reply-to:content-transfer-encoding; bh=lcUts9IRbHMoYKbUwXCQXdwgQkjG8wAgntfc6a84Bzk=; b=i6JialmZiw+wHNeAvHcpKTIFr0MYcZSBWHyK9ku4aQu3UocWa79NsyyNmyZAjZxLXF PMHTN+aMRiS9m/Lc5x3K/0diosTPQEjG9P4lx2GzEHd3O3fCe5ICdFvFa6XC1rDYWjgF fB5sKKdLorSL3/BvShteEZ3YsoJ48nKfHxDDemnRRPRIh6srncHNrCp41yl9zFfzTa3e gZGArV8NlySbiki+wKdD4rOi91oUEacsZ+akcux088FMB07dPkgxgtN0Lz3RIoRSwKlD Fhr18qgexDLlJy9/2meoYDpr0YQSga9XJllO/448ogR2uD5X8Am0GB3TJw6ZNKjTJWxS LWdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=lcUts9IRbHMoYKbUwXCQXdwgQkjG8wAgntfc6a84Bzk=; b=7HqUeQQGS3LvOYw0Bg85Yw+KDtvx8jxWSMLsdCfUHuXKSK71IKaMwVQtHgmuh/wZ/n a36FH5QKamw5wK4FKm3h1O6qEky7Y3fjOZQbzj8oltARnrfZSqtekrMAQsbjh3CqUWOP HEzkqAoBqdZPA9EajOT4hGBe1Nmw3mEFLwMO8I4KA1IxhhJrxfYQvnHZY0e4wqx4TJwm 4YW1fC+3S4pdxSYDWAvxh82vJv8DvjQd0e1GSZ7pVNexxS3TmWhMVN5V8JVvx3MpFypF gSFmCaTYh6zkRCp30IN2ImohKn4VN3I25t4xboPCSVJpplCxEm02GS/eAPnrOio/z7cG bwHw== X-Gm-Message-State: AJIora9JDox8BjtQVNM5YZFYJZY2fZkU1+nU8w35ELgIjauNrjku5ZyF tGierpnyc45OfcAlfLv+cwAWmw== X-Google-Smtp-Source: AGRyM1uh4FYNuZr5eq7SjLg0KSqYaKNNix56AAXCr8IAjyfrw3Y704ctiVNZiyUFZK8dp7vB5+ohjQ== X-Received: by 2002:a63:1047:0:b0:40d:7553:d897 with SMTP id 7-20020a631047000000b0040d7553d897mr12334549pgq.485.1656685854229; Fri, 01 Jul 2022 07:30:54 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id u3-20020a170903108300b0016a613012a0sm15494212pld.210.2022.07.01.07.30.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jul 2022 07:30:53 -0700 (PDT) Message-ID: Date: Fri, 1 Jul 2022 08:30:52 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v7 15/15] xfs: Add async buffered write support Content-Language: en-US From: Jens Axboe To: Al Viro , Stefan Roesch Cc: io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz, hch@infradead.org, Christoph Hellwig References: <20220601210141.3773402-1-shr@fb.com> <20220601210141.3773402-16-shr@fb.com> <0a75a0c4-e2e5-b403-27bc-e43872fecdc1@kernel.dk> In-Reply-To: <0a75a0c4-e2e5-b403-27bc-e43872fecdc1@kernel.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=i6JialmZ; dmarc=none; spf=pass (imf09.hostedemail.com: domain of axboe@kernel.dk designates 209.85.215.182 as permitted sender) smtp.mailfrom=axboe@kernel.dk ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656685855; a=rsa-sha256; cv=none; b=3gvnd3zsZgKsAJNDle5LbTYV2WbPgo6gNm+sST7dcHjj73KUFG/SmuTJ58mguJAZI7VDHH /4H2wv6rly3oN31X1PRcoiD6L45OGPZNt8C/Yx4liZ+nl2LspZ2KFBDVKU3KuNe+zPp3Ky AbTDJwb1R1dU8H/BS6Obc1uGXxQSdvo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656685855; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lcUts9IRbHMoYKbUwXCQXdwgQkjG8wAgntfc6a84Bzk=; b=cYkmsmZotAPTf1bZHSQbeXuT4/wNEh/+5Z1LiK34WGfkXWw+gv3TBsOJcMvMrpGoa6dQtZ 168LEPMZdRnObRlTwWiSIzKVh47qYBNWDlU+wEhwGwiHwcwNUq1LvTcYq6R5LaXhBAXl/+ GlYvwhw2bGGxkAcJ4hSLp7RmcvsOYqY= X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=i6JialmZ; dmarc=none; spf=pass (imf09.hostedemail.com: domain of axboe@kernel.dk designates 209.85.215.182 as permitted sender) smtp.mailfrom=axboe@kernel.dk X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3A4BF140048 X-Stat-Signature: 5hspe7o6d1xa6wfeiyart4gxenpi3uti X-HE-Tag: 1656685855-627003 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: On 7/1/22 8:19 AM, Jens Axboe wrote: > On 6/30/22 10:39 PM, Al Viro wrote: >> On Wed, Jun 01, 2022 at 02:01:41PM -0700, Stefan Roesch wrote: >>> This adds the async buffered write support to XFS. For async buffered >>> write requests, the request will return -EAGAIN if the ilock cannot be >>> obtained immediately. >> >> breaks generic/471... > > That test case is odd, because it makes some weird assumptions about > what RWF_NOWAIT means. Most notably that it makes it mean if we should > instantiate blocks or not. Where did those assumed semantics come from? > On the read side, we have clearly documented that it should "not wait > for data which is not immediately available". > > Now it is possible that we're returning a spurious -EAGAIN here when we > should not be. And that would be a bug imho. I'll dig in and see what's > going on. This is the timestamp update that needs doing which will now return -EAGAIN if IOCB_NOWAIT is set as it may block. I do wonder if we should just allow inode time updates with IOCB_NOWAIT, even on the io_uring side. Either that, or passed in RWF_NOWAIT semantics don't map completely to internal IOCB_NOWAIT semantics. At least in terms of what generic/471 is doing, but I'm not sure who came up with that and if it's established semantics or just some made up ones from whomever wrote that test. I don't think they make any sense, to be honest. -- Jens Axboe