From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id D75997F53 for ; Fri, 22 Aug 2014 10:01:38 -0500 (CDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay3.corp.sgi.com (Postfix) with ESMTP id 75CB6AC003 for ; Fri, 22 Aug 2014 08:01:35 -0700 (PDT) Received: from sandeen.net (sandeen.net [63.231.237.45]) by cuda.sgi.com with ESMTP id qWL7Cn5esSpvzhhB for ; Fri, 22 Aug 2014 08:01:33 -0700 (PDT) Message-ID: <53F75B54.8050802@sandeen.net> Date: Fri, 22 Aug 2014 10:01:40 -0500 From: Eric Sandeen MIME-Version: 1.0 Subject: Re: [PATCH 3/4] xfs: combine xfs_rtmodify_summary and xfs_rtget_summary References: <53F6942B.80808@redhat.com> <53F6963D.9090500@sandeen.net> <20140822131950.GC3915@laptop.bfoster> In-Reply-To: <20140822131950.GC3915@laptop.bfoster> 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: Brian Foster Cc: Eric Sandeen , xfs-oss On 8/22/14, 8:19 AM, Brian Foster wrote: > On Thu, Aug 21, 2014 at 08:00:45PM -0500, Eric Sandeen wrote: ... >> @@ -480,15 +484,40 @@ xfs_rtmodify_summary( >> } >> } >> /* >> - * Point to the summary information, modify and log it. >> + * Point to the summary information, modify/log it, and/or copy it out. >> */ >> sp = XFS_SUMPTR(mp, bp, so); >> - *sp += delta; >> - xfs_trans_log_buf(tp, bp, (uint)((char *)sp - (char *)bp->b_addr), >> - (uint)((char *)sp - (char *)bp->b_addr + sizeof(*sp) - 1)); >> + if (delta) { >> + uint first = (uint)((char *)sp - (char *)bp->b_addr); >> + >> + *sp += delta; >> + xfs_trans_log_buf(tp, bp, first, first + sizeof(*sp) - 1); >> + } >> + if (sum) { >> + /* >> + * Drop the buffer if we're not asked to remember it. >> + */ >> + if (!rbpp) >> + xfs_trans_brelse(tp, bp); > > This introduces some potentially weird circumstances (e.g., acquire, > log, release of a buffer), but I think it's resolved by the next patch. > > Reviewed-by: Brian Foster does it introduce it, or just highlight it? I thought it was weird too, but I think it existed before; that's what prompted me to go looking at callers and drop the rbpp checks, FWIW. -Eric _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs