Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp313954pxa; Fri, 14 Aug 2020 05:12:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzueM0qDQUF5ZseOjkaH3brJIPBgpF+zZJVN9Q+M+cBmIrR49SsER3cPvJqpItbOB6YBm7f X-Received: by 2002:a17:906:fb04:: with SMTP id lz4mr2197893ejb.394.1597407133582; Fri, 14 Aug 2020 05:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597407133; cv=none; d=google.com; s=arc-20160816; b=vXA0XlIxBW21GoV2+dFfxp2/2MFoQQEV2R1HcoLqPWJM6sTOhDHjZF2UZ97ExTljoh gZhJmJPolUHUSQWzhk2F1sWLTgANWsv2y5NzR5qLI2FwK0Iy4orIjppzrpMc35xmTqe7 3vCNuOV2oyF+jz/DQFkXcbjc4vhYxJx9ORPv/PgzvbqRtOzNMD9Ms7wnfpyeR/x8YBBM dRZWzxcFr6KtHV/EyEzS5PmfAKnirFYuLDnoKTEziBHnn3PJM+DAaY2rYGdCAo6Mui06 /AYaZRy7Sra8YAwMwBObzh32ylZ4ZIJyriEtuM6QRw8OiP5xZbpjG0Fqo7A4d0uFRcvL fhFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=zcIN3o7nFZcsDHO6slakDMVz6rP7Gh3OIOKHo+4Ripk=; b=S7rCKwDOArqYU1OOpaUbcSIaowMj4sylEusEBSsaDVOGiooiR4qzBAd2OZbgNfw9M3 45DNuTb3JPrhW0T0ZUqVRV/NjmGSDj6GJGNuzzICfUmIihAfBa8TS1Qid+3LhXWhARPk ROus6Abz6M2U4GaevYEIaE9UpqOkMLRy+5uJzPlIJiQ4cIsjzHHtajjZ7NR6dpAtgXtl nPkjct3YVBLSB5pwQOZl55w4ta3KciEkDsw1WAas+XzgxK1Y4pq5oLFuezw9wkvP7C5U C1k3c5yMp7IxUfI5P/3cFEVjo6Am95sl9JseLvHU/ZHDt9wMYGvHXc3/lPnpdlF7gK+d iltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=o7pOkJqi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si5133348edv.411.2020.08.14.05.11.50; Fri, 14 Aug 2020 05:12:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=o7pOkJqi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbgHNMEc (ORCPT + 99 others); Fri, 14 Aug 2020 08:04:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726681AbgHNMEb (ORCPT ); Fri, 14 Aug 2020 08:04:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23294C061384; Fri, 14 Aug 2020 05:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zcIN3o7nFZcsDHO6slakDMVz6rP7Gh3OIOKHo+4Ripk=; b=o7pOkJqix8h4n8IfLn2Y+C4bnN NAS93wz3etTRWKWCkhPZYrKM0H+6XReBTPxs5I4XvfRTP7YqjYOZOz/5feL4W/hwVbHSG+Nc3sQba aBdx4NgUvbBWjQhL+bVVSLe21m6KKY3iPx7/UXWq2LqsDkLGKQHuQKIM/aVwmOPvuNqbk9ecxon/A KHTdlymSifqJv36Rwv5TrG7pfDzsJd7y7e/ZwawtyOmoUr6+r7Yi2OQuZfk9Wg+6M/9cqQJ7S0x2Z jK9oog66MXYCVHaRUkfEphDoX8dVWOshqKi0CMQQmaXY2P2yIeQ7o5bNyCqJoR2cap9BEYD7gLNsE osXH/Fcg==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6YRa-0000ck-NZ; Fri, 14 Aug 2020 12:04:22 +0000 Date: Fri, 14 Aug 2020 13:04:22 +0100 From: "hch@infradead.org" To: Damien Le Moal Cc: "hch@infradead.org" , Kanchan Joshi , Jens Axboe , Pavel Begunkov , Kanchan Joshi , "viro@zeniv.linux.org.uk" , "bcrl@kvack.org" , Matthew Wilcox , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-aio@kvack.org" , "io-uring@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-api@vger.kernel.org" , SelvaKumar S , Nitesh Shetty , Javier Gonzalez , Johannes Thumshirn , Naohiro Aota Subject: Re: [PATCH v4 6/6] io_uring: add support for zone-append Message-ID: <20200814120422.GA1872@infradead.org> References: <20200731091416.GA29634@infradead.org> <20200731094135.GA4104@infradead.org> <20200731125110.GA11500@infradead.org> <20200814081411.GA16943@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14, 2020 at 08:27:13AM +0000, Damien Le Moal wrote: > > > > O_APPEND pretty much implies out of order, as there is no way for an > > application to know which thread wins the race to write the next chunk. > > Yes and no. If the application threads do not synchronize their calls to > io_submit(), then yes indeed, things can get out of order. But if the > application threads are synchronized, then the offset set for each append AIO > will be in sequence of submission, so the user will not see its writes > completing at different write offsets than this implied offsets. Nothing gurantees any kind of ordering for two separate io_submit calls. The kernel may delay one of them for any reason. Now if you are doing two fully synchronous write calls on an O_APPEND fd, yes they are serialized. But using Zone Append won't change that.