From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 1BB2A7F37 for ; Mon, 21 Dec 2015 11:32:27 -0600 (CST) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay1.corp.sgi.com (Postfix) with ESMTP id 0B8378F8039 for ; Mon, 21 Dec 2015 09:32:26 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by cuda.sgi.com with ESMTP id 3c8lRq8Zt1NlkNXY (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Dec 2015 09:32:25 -0800 (PST) Date: Mon, 21 Dec 2015 18:32:24 +0100 From: Jan Kara Subject: Re: [PATCH v5 6/7] ext4: call dax_pfn_mkwrite() for DAX fsync/msync Message-ID: <20151221173223.GC7030@quack.suse.cz> References: <1450502540-8744-1-git-send-email-ross.zwisler@linux.intel.com> <1450502540-8744-7-git-send-email-ross.zwisler@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1450502540-8744-7-git-send-email-ross.zwisler@linux.intel.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Ross Zwisler Cc: Dave Hansen , "J. Bruce Fields" , linux-mm@kvack.org, Andreas Dilger , "H. Peter Anvin" , Jeff Layton , Dan Williams , linux-nvdimm@lists.01.org, x86@kernel.org, Ingo Molnar , Matthew Wilcox , linux-ext4@vger.kernel.org, xfs@oss.sgi.com, Alexander Viro , Thomas Gleixner , Theodore Ts'o , linux-kernel@vger.kernel.org, Jan Kara , linux-fsdevel@vger.kernel.org, Andrew Morton , Matthew Wilcox On Fri 18-12-15 22:22:19, Ross Zwisler wrote: > To properly support the new DAX fsync/msync infrastructure filesystems > need to call dax_pfn_mkwrite() so that DAX can track when user pages are > dirtied. The patch looks good to me. You can add: Reviewed-by: Jan Kara Honza > > Signed-off-by: Ross Zwisler > --- > fs/ext4/file.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/ext4/file.c b/fs/ext4/file.c > index 749b222..8c8965c 100644 > --- a/fs/ext4/file.c > +++ b/fs/ext4/file.c > @@ -291,8 +291,8 @@ static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma, > { > struct inode *inode = file_inode(vma->vm_file); > struct super_block *sb = inode->i_sb; > - int ret = VM_FAULT_NOPAGE; > loff_t size; > + int ret; > > sb_start_pagefault(sb); > file_update_time(vma->vm_file); > @@ -300,6 +300,8 @@ static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma, > size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT; > if (vmf->pgoff >= size) > ret = VM_FAULT_SIGBUS; > + else > + ret = dax_pfn_mkwrite(vma, vmf); > up_read(&EXT4_I(inode)->i_mmap_sem); > sb_end_pagefault(sb); > > -- > 2.5.0 > > -- Jan Kara SUSE Labs, CR _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs