From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q1L5E8fq145672 for ; Mon, 20 Feb 2012 23:14:08 -0600 Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by cuda.sgi.com with ESMTP id 6AXonXNadlRUjXKx for ; Mon, 20 Feb 2012 21:14:06 -0800 (PST) Date: Tue, 21 Feb 2012 16:14:04 +1100 From: Dave Chinner Subject: Re: [PATCH 6/8] xfs: make xfs_inode_item_size idempotent Message-ID: <20120221051404.GM3592@dastard> References: <20120221003824.415885674@bombadil.infradead.org> <20120221003907.081625923@bombadil.infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120221003907.081625923@bombadil.infradead.org> 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 Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Christoph Hellwig Cc: xfs@oss.sgi.com On Mon, Feb 20, 2012 at 07:38:30PM -0500, Christoph Hellwig wrote: > Move all code messing with the inode log item flags into xfs_inode_item_format > to make sure xfs_inode_item_size really only calculates the the number of > vectors, but doesn't modify any state of the inode item. > > Signed-off-by: Christoph Hellwig Looks ok so: Reviewed-by: Dave Chinner One minor cleanup: > case XFS_DINODE_FMT_LOCAL: > - ASSERT(!(iip->ili_format.ilf_fields & > - (XFS_ILOG_ABROOT | XFS_ILOG_AEXT))); > - if (iip->ili_format.ilf_fields & XFS_ILOG_ADATA) { > + iip->ili_format.ilf_fields &= > + ~(XFS_ILOG_AEXT | XFS_ILOG_ABROOT); > + > + if ((iip->ili_format.ilf_fields & XFS_ILOG_ADATA) && > + ip->i_afp->if_bytes > 0) { > ASSERT(ip->i_afp->if_bytes > 0); That assert can go - it's checked in the if statement now. Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs