From patchwork Fri Sep 22 13:59:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9966193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD0346035E for ; Fri, 22 Sep 2017 13:59:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B84C120223 for ; Fri, 22 Sep 2017 13:59:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB355298EC; Fri, 22 Sep 2017 13:59:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5014920223 for ; Fri, 22 Sep 2017 13:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbdIVN7w (ORCPT ); Fri, 22 Sep 2017 09:59:52 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:60386 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbdIVN7t (ORCPT ); Fri, 22 Sep 2017 09:59:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=X3luBDdE7GZd2LBHvbnxAdls0+jFNk+aCxCn0vWXpIQ=; b=ro/MalGwV6RIPTj4N8bjvgWpp /bksi7IOX0zgeeK0HjEFf9Alf5dJ3S4aD88hSf4lvO+y3jejnQIALmO+XpRMfKY8rYUWjEy0EMAP1 D47huJ3dn4HFiVCGacvIZHdEbFPvwJAc+un7daFw9MTcaAJXmmzYNXcnF+YR0/VgZn0HeU+8457IE QGJUPe8NBCjU6crLmcX6YfnZk1dHee4GM4nUol7FfFu/n28iTkh1/KKWM5JBBEPgEu+HAAYTXrZGp HXT/1Y6dRM3VI3yJc65euGo+pF9aQDVmGfPfQzNB4se1oSztpitqms1WJ40fTOSn+9twCwoqs9fPb 8biaW5L8w==; Received: from ip-64-134-232-11.public.wayport.net ([64.134.232.11] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dvOUf-0001AX-KN for linux-xfs@vger.kernel.org; Fri, 22 Sep 2017 13:59:49 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Subject: [PATCH 07/19] xfs: use correct state defines in xfs_bmap_del_extent_{cow, delay} Date: Fri, 22 Sep 2017 06:59:33 -0700 Message-Id: <20170922135945.31574-8-hch@lst.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922135945.31574-1-hch@lst.de> References: <20170922135945.31574-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the _FILLING values to match the usage in the xfs_bmap_add_extent_* helpers. No change in behavior, just better naming in the code and tracepoint output. Signed-off-by: Christoph Hellwig Reported-by: Brian Foster Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_bmap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 06f1bd9e144e..aa4af31750d3 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4897,19 +4897,19 @@ xfs_bmap_del_extent_delay( state |= BMAP_COWFORK; if (got->br_startoff == del->br_startoff) - state |= BMAP_LEFT_CONTIG; + state |= BMAP_LEFT_FILLING; if (got_endoff == del_endoff) - state |= BMAP_RIGHT_CONTIG; + state |= BMAP_RIGHT_FILLING; - switch (state & (BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG)) { - case BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG: + switch (state & (BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING)) { + case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING: /* * Matches the whole extent. Delete the entry. */ xfs_iext_remove(ip, *idx, 1, state); --*idx; break; - case BMAP_LEFT_CONTIG: + case BMAP_LEFT_FILLING: /* * Deleting the first part of the extent. */ @@ -4922,7 +4922,7 @@ xfs_bmap_del_extent_delay( xfs_iext_update_extent(ifp, *idx, got); trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_); break; - case BMAP_RIGHT_CONTIG: + case BMAP_RIGHT_FILLING: /* * Deleting the last part of the extent. */ @@ -5007,19 +5007,19 @@ xfs_bmap_del_extent_cow( ASSERT(!isnullstartblock(got->br_startblock)); if (got->br_startoff == del->br_startoff) - state |= BMAP_LEFT_CONTIG; + state |= BMAP_LEFT_FILLING; if (got_endoff == del_endoff) - state |= BMAP_RIGHT_CONTIG; + state |= BMAP_RIGHT_FILLING; - switch (state & (BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG)) { - case BMAP_LEFT_CONTIG | BMAP_RIGHT_CONTIG: + switch (state & (BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING)) { + case BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING: /* * Matches the whole extent. Delete the entry. */ xfs_iext_remove(ip, *idx, 1, state); --*idx; break; - case BMAP_LEFT_CONTIG: + case BMAP_LEFT_FILLING: /* * Deleting the first part of the extent. */ @@ -5030,7 +5030,7 @@ xfs_bmap_del_extent_cow( xfs_iext_update_extent(ifp, *idx, got); trace_xfs_bmap_post_update(ip, *idx, state, _THIS_IP_); break; - case BMAP_RIGHT_CONTIG: + case BMAP_RIGHT_FILLING: /* * Deleting the last part of the extent. */