From patchwork Thu Nov 20 05:48:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 5345831 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E46249F2F1 for ; Thu, 20 Nov 2014 05:48:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CC4520127 for ; Thu, 20 Nov 2014 05:48:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39DA420115 for ; Thu, 20 Nov 2014 05:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755854AbaKTFsS (ORCPT ); Thu, 20 Nov 2014 00:48:18 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:56884 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755866AbaKTFsP (ORCPT ); Thu, 20 Nov 2014 00:48:15 -0500 Received: from hch by bombadil.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1XrKbF-0001fs-7L; Thu, 20 Nov 2014 05:48:13 +0000 Date: Wed, 19 Nov 2014 21:48:13 -0800 From: Christoph Hellwig To: "J. Bruce Fields" Cc: Christoph Hellwig , Benjamin Coddington , Tom Haynes , Linux NFS Mailing List Subject: Re: Client never uses DATA_SYNC Message-ID: <20141120054813.GA32361@infradead.org> References: <20141105085317.GA18658@infradead.org> <20141105144133.GA3139@fieldses.org> <20141106201341.GD22638@fieldses.org> <20141107072637.GA25215@infradead.org> <20141118170210.GG7419@fieldses.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20141118170210.GG7419@fieldses.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Nov 18, 2014 at 12:02:10PM -0500, J. Bruce Fields wrote: > On Thu, Nov 06, 2014 at 11:26:37PM -0800, Christoph Hellwig wrote: > > Note that for filesystems natively implementing the change attribute > > (btrfs, XFSv5 and ext4 with a mount option) there is no difference anyway, > > Is there something special I have to do to get this on xfs? You need to create a version 5 filesystem. For this your need fairly recent xfsprogs (e.g. RHEL7ish), and create the filesystem using # mkfs.xf -m crc=1 /dev/device You probably also want the untested patch below to proper initialize the version on inodes read from disk: --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index ec6dcdc..c1e2700 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1277,6 +1277,9 @@ xfs_setup_inode( inode->i_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec; xfs_diflags_to_iflags(inode, ip); + if (xfs_sb_version_hascrc(&ip->i_mount->m_sb)) + inode->i_version = ip->i_d.di_changecount; + ip->d_ops = ip->i_mount->m_nondir_inode_ops; lockdep_set_class(&ip->i_lock.mr_lock, &xfs_nondir_ilock_class); switch (inode->i_mode & S_IFMT) {