From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id BA6C17F50 for ; Fri, 22 Nov 2013 09:55:18 -0600 (CST) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay2.corp.sgi.com (Postfix) with ESMTP id 8D0CF30407B for ; Fri, 22 Nov 2013 07:55:18 -0800 (PST) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by cuda.sgi.com with ESMTP id NSC2ndrCKhtmE3uK (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 22 Nov 2013 07:55:17 -0800 (PST) Message-ID: <528F7E9D.7090504@oracle.com> Date: Fri, 22 Nov 2013 23:56:13 +0800 From: Jeff Liu MIME-Version: 1.0 Subject: Re: [PATCH] xfs: fix assertion failure at xfs_setattr_nonsize References: <528F743D.9010800@oracle.com> <20131122151735.GA2405@infradead.org> <528F796F.6070601@oracle.com> <20131122153858.GA19801@infradead.org> In-Reply-To: <20131122153858.GA19801@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 Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Christoph Hellwig Cc: "xfs@oss.sgi.com" On 11/22/2013 11:38 PM, Christoph Hellwig wrote: > On Fri, Nov 22, 2013 at 11:34:07PM +0800, Jeff Liu wrote: >> On 11/22 2013 23:17 PM, Christoph Hellwig wrote: >>> On Fri, Nov 22, 2013 at 11:11:57PM +0800, Jeff Liu wrote: >>>> To remain the current semantics under the debug mode, this fix add >>>> an additional judgement to make this assertion only works for non-CRC >>>> enabled version. >>> >>>> if (!gid_eq(igid, gid)) { >>>> if (XFS_IS_QUOTA_RUNNING(mp) && XFS_IS_GQUOTA_ON(mp)) { >>>> - ASSERT(!XFS_IS_PQUOTA_ON(mp)); >>>> +#ifdef DEBUG quota >>>> + if (!xfs_sb_version_has_pquotino(&mp->m_sb)) >>>> + ASSERT(!XFS_IS_PQUOTA_ON(mp)); >>>> +#endif >>>> ASSERT(mask & ATTR_GID); >>>> ASSERT(gdqp); >>> >>> I'd just kill this assert. >> I hesitated about killing this assertion or hold the line before, will fix it soon. > > If we want to keep it maybe write is a little nicer: > > ASSERT(xfs_sb_version_has_pquotino(&mp->m_sb) || > !XFS_IS_PQUOTA_ON(mp)); Nice point! I'd take this suggestion. Thanks, -Jeff _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs