Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1618992pxb; Tue, 26 Oct 2021 12:24:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo0eaz2CcnYNNyzyQqpGWlzdefErh4NRI7tp8v+vn1W6FMVFg9s7SU8tvaTos/uyiWMF7Y X-Received: by 2002:a17:907:3e85:: with SMTP id hs5mr33143049ejc.234.1635276254795; Tue, 26 Oct 2021 12:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635276254; cv=none; d=google.com; s=arc-20160816; b=PfqkDkDMYXUnM6VPq/yhLsGdWycPZpyaQzzJtuTKXIEW/DDS7wsxO0CNIhixUG/1vo u2QN/tg3Dl785JogCljbUllGAP5BkCmjMb/2mS8pRLSGgzSgqHDen1IFpBT2ZGuduu2v J3mZKxtWMVJPxPXq5EGHIBR9+gpsvLebv4a1m0GpG73sPlWAMf6WXVIG+UCTMr3JlEoP OaCI+lNLZlDqlTyAU0UdCdl6UA9G+E9GvTrCj2Ovr1XZrBVyUQU1foWHHGNN0jqz162W LTfv24ljFBivdi4h4ACOiFX3CkLuif19Va7dOH9kcZ6Ga5tRmq/3BwAOXJfuuozuNCPc suVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sdO8mlHtF+puSbBGI1qQ9PiGZbKH05p+oRLqzOV2+1g=; b=PRQthCdbdY/zGnjfjXrYmP8aNWdsqPrAEv3oDJVa1AkWxomn6g3YEhGaZX2adRtrRg NXp263a1ZTfC6R8WXisNbZTMSpkjkHlNcxQWyxZCOhZ5fMVz++58tul8jwGJxCJaOJvw oUHViLUlWlG1RfVkRv/xPiZwDy75pxr0PaymyKwzcfVubAnMrRNemZTAOI8ilr3e1lKy GJQfvB9guUozrSrJCuvwDa8gXL5vm7y8Z2VIDpoDoyLlbcAioU+yMN0+r8CAKCFXzpY2 TZ39mk+28rSCl1ucBzPCOu3pS2/6bnzTwhJ7ZSZx9N6JoaFxbHmm4TtzZgAbVbIcqrHo rVcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N9UJUjU3; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id js9si8347645ejc.92.2021.10.26.12.23.45; Tue, 26 Oct 2021 12:24:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N9UJUjU3; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237076AbhJZPvA (ORCPT + 99 others); Tue, 26 Oct 2021 11:51:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:50898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237075AbhJZPvA (ORCPT ); Tue, 26 Oct 2021 11:51:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D543160EFE; Tue, 26 Oct 2021 15:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635263314; bh=2+3VUKf/vfToAgnI/bI7hDWfTWfhxBk06YKhqrMekpk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N9UJUjU3qrxIBg7uUkGgiJRyM3tIoImsPaBaU6CfqzHnz3obYg8pskuAiI4ZbWWw5 AGjBRThWSeawlqQGAUz8cCLjcmgYEIWmO/92w30NUKt60GaQNsQh0JpFN9YPnSh6Y2 1RyZLpKaNQAE3ZcCDA5+bYN6an2K2GPqd7BoE3qWP6bHrLfenLrHEkHNjlXqzT28PU 4aACq+U34GVdjaSs0RATNUSnRiOEY4omYbHhgd61XFofH6ZYekvgJzaOmf5z8NCpZC 46kLmaJP6FA79KfizeMEuICrTY2QThx5w3nNLuyeQkllsrjNtNVsK+wvkfCehuDtDX TJiRI+xW1EMyw== Date: Tue, 26 Oct 2021 08:48:34 -0700 From: "Darrick J. Wong" To: JeffleXu Cc: Theodore Ts'o , adilger.kernel@dilger.ca, ira.weiny@intel.com, linux-xfs@vger.kernel.org, "linux-ext4@vger.kernel.org" , linux-fsdevel@vger.kernel.org, dan.j.williams@intel.com, Vivek Goyal , Christoph Hellwig Subject: Re: [Question] ext4/xfs: Default behavior changed after per-file DAX Message-ID: <20211026154834.GB24307@magnolia> References: <26ddaf6d-fea7-ed20-cafb-decd63b2652a@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26ddaf6d-fea7-ed20-cafb-decd63b2652a@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Oct 26, 2021 at 10:12:17PM +0800, JeffleXu wrote: > Hi, > > Recently I'm working on supporting per-file DAX for virtiofs [1]. Vivek > Goyal and I are interested [2] why the default behavior has changed > since introduction of per-file DAX on ext4 and xfs [3][4]. > > That is, before the introduction of per-file DAX, when user doesn't > specify '-o dax', DAX is disabled for all files. After supporting > per-file DAX, when neither '-o dax' nor '-o dax=always|inode|never' is > specified, it actually works in a '-o dax=inode' way if the underlying > blkdev is DAX capable, i.e. depending on the persistent inode flag. That > is, the default behavior has changed from user's perspective. > > We are not sure if this is intentional or not. Appreciate if anyone > could offer some hint. Yes, that was an intentional change to all three filesystems to make the steps we expose to sysadmins/users consistent and documented officially: https://lore.kernel.org/linux-fsdevel/20200429043328.411431-1-ira.weiny@intel.com/ (This was the first step; ext* were converted as separate series around the same time.) --D > > > [1] https://lore.kernel.org/all/YW2Oj4FrIB8do3zX@redhat.com/T/ > [2] > https://lore.kernel.org/all/YW2Oj4FrIB8do3zX@redhat.com/T/#mf067498887ca2023c64c8b8f6aec879557eb28f8 > [3] 9cb20f94afcd2964944f9468e38da736ee855b19 ("fs/ext4: Make DAX mount > option a tri-state") > [4] 02beb2686ff964884756c581d513e103542dcc6a ("fs/xfs: Make DAX mount > option a tri-state") > > > -- > Thanks, > Jeffle