Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4108714yba; Tue, 9 Apr 2019 11:18:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqz31ha6/1Fqvznt9zMb9kEPoCPGrejxfQfgQi/e5Ft/D/7WZlHicwm8/PMo1U8Suv+LV36E X-Received: by 2002:a17:902:2965:: with SMTP id g92mr21396023plb.267.1554833919031; Tue, 09 Apr 2019 11:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554833919; cv=none; d=google.com; s=arc-20160816; b=MgsxhQaRQ/WAO9J0zb16vOQjr4tL/Nx6YNbMbPtvF0yWNTuO2y3fHNqVFBdYqH8VxF km1LVeWVIca3WIRbavh45YB1xotfDpxU0/p9gZRSFTGpnvNOtsWBfk5x9bxYGe2mWGKA q4BN0FTkjCPppoLjFVy7MbhQvFaXADFAlvqbsux/uIgG0bzTpReZwSvVgcw96nB+2Gdy M54qHRLcf6Mq0Gawx4u799dr8OcBIRhomkscnWhZR68k4jOQmVeyV+IBX40Osl8Blv32 249gEcDl3Trlmp6EyJHOhMbAT0tmW09sXSpM/5Fq1otZcwETkgB4fT1NvQD/6Q9XyQG3 bE6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w4Tq1tlD1boxk5aZkvP55taQSNxKwcRyVY1dumhNGOI=; b=DV+bWWqkt1ANb4zO1hk0jQs07jQ2YqBpTuIc1qySM63BciylRbUPRzi3PTUVRPHKyN rBccvOT7kj0ZkN50iciePHhJgakQW0tvC4b+2zBb24fIot5KSz08zocs8ge79MejNLAE I227W/yHpJIF0vFDwlglR7RaVufyHA/Ybz560ehLQJO3IpRKjtgJyOwbYK6FxnSG3Mfg n5SyMx1QVt37PJ0dSTL5IsfvPK7JFk6XcPQ80S/0xAl3q6ReKGkBiWG3Yy5BzyoP3EUR BowJzoBDkmE+gHHzCQ4G0eDDsdfi0EuNlC4B8LUp0oaOyuq3NPrlKv5ZMpB3Cq0SQjAb TpBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UeE2LcmT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c7si1605684pgw.404.2019.04.09.11.18.23; Tue, 09 Apr 2019 11:18:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UeE2LcmT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbfDISRn (ORCPT + 99 others); Tue, 9 Apr 2019 14:17:43 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42286 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726431AbfDISRn (ORCPT ); Tue, 9 Apr 2019 14:17:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=w4Tq1tlD1boxk5aZkvP55taQSNxKwcRyVY1dumhNGOI=; b=UeE2LcmTeAh20O8k5k6RvyAk8 AOR0rCbN2dd3lCKoV6MrYu8FExp40szAdowOJd6Fa0ay8gNYE452laKROK497ZzWqrCHbakL9pLJx TisYe9MPALrzmGNugCkLCHK8CfYdxt7+aiqHYcbzwJ45D2WJGFqmnVDFAFybt9Htsjzb2nMeMpJI1 e8FSIGwfTyMGvv06ZmCUlYZQa12D7P1aBYzHxT3ZCnvtJfZ5vfl1YNg9vWKHDTSw5qeJYLS5v7COF PHmcsv8g05sxfj9z9pVRntQbLQQF2MNnVWN7h2Hf+tnGEoJADxM36tAGDaLPfJe6UVSA5LFwFD6WZ eVXnOMhHQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hDvJW-00080j-C9; Tue, 09 Apr 2019 18:17:42 +0000 Date: Tue, 9 Apr 2019 11:17:42 -0700 From: Christoph Hellwig To: Jens Axboe Cc: linux-fsdevel , "linux-block@vger.kernel.org" , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] io_uring: add support for barrier fsync Message-ID: <20190409181742.GA24925@infradead.org> References: <7c7276e4-8ffa-495a-6abf-926a58ee899e@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c7276e4-8ffa-495a-6abf-926a58ee899e@kernel.dk> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.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 Tue, Apr 09, 2019 at 10:27:43AM -0600, Jens Axboe wrote: > It's a quite common use case to issue a bunch of writes, then an fsync > or fdatasync when they complete. Since io_uring doesn't guarantee any > type of ordering, the application must track issued writes and wait > with the fsync issue until they have completed. > > Add an IORING_FSYNC_BARRIER flag that helps with this so the application > doesn't have to do this manually. If this flag is set for the fsync > request, we won't issue it until pending IO has already completed. I think we need a much more detailed explanation of the semantics, preferably in man page format. Barrier at least in Linux traditionally means all previously submitted requests have finished and no new ones are started until the barrier request finishes, which is very heavy handed. Is that what this is supposed to do? If not what are the exact guarantees vs ordering and or barrier semantics?