Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5825164ybi; Tue, 28 May 2019 21:08:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzE9EYDgzwhpOp+F8LCSfeRGYqA3Ei9n7fBm/0u/OxE9Hlom+R27qy7lbD6JguyFWS/lq84 X-Received: by 2002:a17:90a:af8a:: with SMTP id w10mr9899905pjq.132.1559102910607; Tue, 28 May 2019 21:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559102910; cv=none; d=google.com; s=arc-20160816; b=IzcscLcHnRpau838h8j6mbFdc5gqXxerlq8zBO06+/8KhDT7CEWPE3dX0bAEd2x3Hl WXnJiB9d+B8E6DIhd2PGdU3yO93KBt3theZv7woQmWpPKP0uRUtbK4n3jlAu79SJD2yn 0Dnsu+C3AZvkW+SydmutRmbKC4Ul9EBoQaVc96KOVT+H3nar32Sj4bGIaBwYz0XTCv8K 7SAF6ZLmLOIbI0Kv8UtQrPcMTxPvN4HNdhTOfTlp829eZfwvu8g1HcjbG1pl6plv8Lkl 2LOFN5XqbD1jlshhy0WPjm7laSLZCv+OTDb+p3UDHo0YUjkoGEfOSi/bdpNx+7vTQqMz fA3A== 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:dmarc-filter:dkim-signature:dkim-signature; bh=Q2SvPC5WPKn+KNL91N2MZiVYS4cDDnk6NFpUmiiGaqc=; b=fCxISBUP9YdO0KmW6dquZNMXahkg6lzaMT4GdGCjSG9a7ocRRHt3ikGFRRd4K86sph VsafWEZVOZ1BvDuTEW55G5VDP5BP9xthp/B6rXNfcgNP3ytjA4L/y8T+yl7RHSpXYHy3 gwX1EYRpPo9c7PPUvRRGu4bEHZ9iB8iCk2QrJjxapjl8KAvwXLAp4nBv3QUuZCtYwLZ4 dyyDK5Lz52sGFlifGqkESB2tlaaU03tprW2PxWHU/Ub/ZGUGAheG3mXDMjBfjBaY+8Nz UnCs0XY+wUcI/UiyR0TRCxDtopLbdFRJm4IWm88mOK2sCkDeeV+U9DjD8SoPTfExyZBY EVGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=g+CX3D0S; dkim=pass header.i=@codeaurora.org header.s=default header.b=S1QiGFMQ; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 c3si14900516pgi.358.2019.05.28.21.08.09; Tue, 28 May 2019 21:08:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=g+CX3D0S; dkim=pass header.i=@codeaurora.org header.s=default header.b=S1QiGFMQ; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725865AbfE2EIE (ORCPT + 99 others); Wed, 29 May 2019 00:08:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40722 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbfE2EIE (ORCPT ); Wed, 29 May 2019 00:08:04 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 61273607C3; Wed, 29 May 2019 04:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559102883; bh=REglHIWHwgfNhMT0rLnIMvEPmMM5hOuJ3s1r/dbgRo8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g+CX3D0SMzysn6MfMG5ngQ3cZcgtq8duQmJDSXhDqKNDLQZjXVFGM0Qe07bgNAVqp QcVoJOqycGWUjLoS/5qBKXTCKT8gP9dEoSYuqUC2yRY4Y3rSLDii8mUfcfusXhgkwb P+1+lTJQrP9SbEci/6g7qqh0zkKCiDnq1iAkBIEE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: stummala@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 721256063A; Wed, 29 May 2019 04:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1559102882; bh=REglHIWHwgfNhMT0rLnIMvEPmMM5hOuJ3s1r/dbgRo8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S1QiGFMQ4ErzCB/rqjBaswSDBReI6DQKXarbUdovxifgk+eH522ExxdJcJrD9AgiQ gA9Nu75ec8fAErMp4qMSYvpFQtEy7LBUX79nTpLkmmc8J8K0ojZVOtZ7X5IaD/8TdS caq+K3/FjWheOUX48RvzV55HbdjoMkZalfvZndww= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 721256063A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=stummala@codeaurora.org Date: Wed, 29 May 2019 09:37:58 +0530 From: Sahitya Tummala To: Theodore Ts'o Cc: Andreas Dilger , linux-ext4@vger.kernel.org Subject: Re: fsync_mode mount option for ext4 Message-ID: <20190529040757.GI10043@codeaurora.org> References: <20190528032257.GF10043@codeaurora.org> <20190528034007.GA19149@mit.edu> <20190528034830.GH10043@codeaurora.org> <20190528131356.GB19149@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190528131356.GB19149@mit.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi Ted, On Tue, May 28, 2019 at 09:13:56AM -0400, Theodore Ts'o wrote: > On Tue, May 28, 2019 at 09:18:30AM +0530, Sahitya Tummala wrote: > > > > Yes, but fsync_mode=nobarrier is little different than > > a general nobarrier option. The fsync_mode=nobarrier is > > only controlling the flush policy for fsync() path, unlike > > the nobarrier mount option which is applicable at all > > places in the filesystem. > > What are you really trying to accomplish with fsync_mode=nobarrier? > And when does that distinction have a difference? > Thanks for your time and reply on this. Here is what I think on these mount options. Please correct me if my understanding is wrong. The nobarrier mount option poses risk even if there is a battery protection against sudden power down, as it doesn't guarantee the ordering of important data such as journal writes on the disk. On the storage devices with internal cache, if the cache flush policy is out-of-order, then the places where FS is trying to enforce barriers will be at risk, causing FS to be inconsistent. But whereas with fsync_mode=nobarrier, FS is not trying to enforce any ordering of data on the disk except to ensure the data is flushed from the internal cache to non-volatile memory. Thus, I see this fsync_mode=nobarrier is much better than a general nobarrier. And it provides better performance too as with nobarrier but without compromising much on FS consistency. I do agree with all your points below on sudden power down scenarios, but if someone wants to take a risk, then I think fsync_mode=nobarrier may be better to enable based on their need/perf requirements. Thanks, > What sort of guarantees are you trying to offer, given a particular > hardware and software design? > > I gather that fsync_mode=nobarrier means one of two things: > > * "screw you, application writer; your data consistency means nothing to me", > > OR > > * "we have sufficient guarantees --- e.g., UPS/battery protection to > guarantee that even if we lose AC mains, or the user press and holds > the power button for eight seconds, we will give storage devices a > sufficient grace period to write everything to persistent storage. We > also have the appropriate hardware to warn of an impending low-battery > shutdown and software to perform a graceful shutdown in that eventuality." > > If it's the latter, then nobarrier works just as well --- even better. > > If it's the former, *why* is it considered a good thing to ignore the > requests of userspace? And without any hardware assurances to provide > a backstop against power drop, do you care or not care about file > system consistency? > > Why do you want the distinction between fsymc_mode=nobarrier and > nobarrier? When would this distinction be considered a good thing? > > - Ted > > > > > > > > > > > > -- -- Sent by a consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.