Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4195115imm; Mon, 17 Sep 2018 09:39:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZjrveQHx3OFm0KKmQshcfH9dXJudf4F8zKPpPpTkR2jFR8l4lmniFic03uoMfNA93R+HBr X-Received: by 2002:a62:6547:: with SMTP id z68-v6mr26609495pfb.20.1537202372834; Mon, 17 Sep 2018 09:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537202372; cv=none; d=google.com; s=arc-20160816; b=TJSmiwls4e7jYYB7nH013uZ9awZhN4NZ/WudS35Ai4ePCLaYgtacZMPRVOoHIuU/X/ 9T8kl29KKV3pS6qo6l1QR7UBIqDpUZfpwa5BTp0lXrrv7MgjW1LMHu6Cst4qas8iBnUs 17yQfVrOWVUyV/0r2ZtWcaSt2RzJ1TyZ2wWdek/IX99uQO4+1jp8QTQrrGLZDxAuloXS SIFJVdIfuc7FyWYi0iVO7u7687G1nn+0mJ/Lb1RCk19oE+dzNSDHtSw2BvjSc0B8zyK3 nQ8iiOZ6pQ9zQ1PGLDWNBQNNuc55EufmJvqyskhK4pMwwrUZQmV6gy1v0W4ZxWhNOUhG 69NQ== 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; bh=s0FrCbFoKF8uRtB+IiQVn62d2jcz2PPhOsLvkQIStu0=; b=rmeiK/ljQtic1LIJo4nx7HFEWmTQnC9CK7P3UawtsUtxgKcyzu+Bm+0mxBBnUrGsba qom+1wOvyivibq90EgIRzOK3LXYtYSbSaoETpntm+0ZPsnEuiTweuXiO3PTiKjvrDl2L ERhVJVMyjiuCo5BS/xGh767rzUFt1+QGSpmIE2Lzo7YmfpGtMfjbBfIVdzgoHGtaoJaV 88vaPzrFwLEZyCubZSt2LeHxKh/vJAadbtBtYrkMgNfUeye1IMQs+iRFxH3ovAga1els g+cIqpJ0mI7qZA+B6l8sQnMqHT7XreDCECKSJ3zmM9ruzABf8q3bszgiTlInboq9p+27 VkAA== ARC-Authentication-Results: i=1; mx.google.com; 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 g27-v6si18111210pfj.283.2018.09.17.09.39.18; Mon, 17 Sep 2018 09:39:32 -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; 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 S1728949AbeIQWFU (ORCPT + 99 others); Mon, 17 Sep 2018 18:05:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:38900 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727124AbeIQWFU (ORCPT ); Mon, 17 Sep 2018 18:05:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5DE6FACB7; Mon, 17 Sep 2018 16:37:11 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id A32FF1E091E; Mon, 17 Sep 2018 18:37:09 +0200 (CEST) Date: Mon, 17 Sep 2018 18:37:09 +0200 From: Jan Kara To: Toshi Kani Cc: jack@suse.cz, dan.j.williams@intel.com, tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 3/3] ext2, dax: set ext2_dax_aops for dax files Message-ID: <20180917163709.GA10257@quack2.suse.cz> References: <20180914145114.11122-1-toshi.kani@hpe.com> <20180914145114.11122-4-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180914145114.11122-4-toshi.kani@hpe.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 14-09-18 08:51:14, Toshi Kani wrote: > Sync syscall to DAX file needs to flush processor cache, but it > currently does not flush to existing DAX files. This is because > 'ext2_da_aops' is set to address_space_operations of existing DAX > files, instead of 'ext2_dax_aops', since S_DAX flag is set after > ext2_set_aops() in the open path. > > Similar to ext4, change ext2_iget() to initialize i_flags before > ext2_set_aops(). > > Fixes: fb094c90748f ("ext2, dax: introduce ext2_dax_aops") > Signed-off-by: Toshi Kani > Suggested-by: Jan Kara > Cc: Jan Kara > Cc: Dan Williams > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: Thanks. I'll take the patch through my tree. Honza > --- > fs/ext2/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c > index 7f7ee18fe179..e4bb9386c045 100644 > --- a/fs/ext2/inode.c > +++ b/fs/ext2/inode.c > @@ -1448,6 +1448,7 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino) > } > inode->i_blocks = le32_to_cpu(raw_inode->i_blocks); > ei->i_flags = le32_to_cpu(raw_inode->i_flags); > + ext2_set_inode_flags(inode); > ei->i_faddr = le32_to_cpu(raw_inode->i_faddr); > ei->i_frag_no = raw_inode->i_frag; > ei->i_frag_size = raw_inode->i_fsize; > @@ -1517,7 +1518,6 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino) > new_decode_dev(le32_to_cpu(raw_inode->i_block[1]))); > } > brelse (bh); > - ext2_set_inode_flags(inode); > unlock_new_inode(inode); > return inode; > -- Jan Kara SUSE Labs, CR