From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CB73C49ED7 for ; Fri, 20 Sep 2019 13:51:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 722B6206C2 for ; Fri, 20 Sep 2019 13:51:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387524AbfITNvc (ORCPT ); Fri, 20 Sep 2019 09:51:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60696 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387505AbfITNvb (ORCPT ); Fri, 20 Sep 2019 09:51:31 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C858C18C890D; Fri, 20 Sep 2019 13:51:31 +0000 (UTC) Received: from bfoster (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E3A260C5E; Fri, 20 Sep 2019 13:51:31 +0000 (UTC) Date: Fri, 20 Sep 2019 09:51:29 -0400 From: Brian Foster To: Allison Collins Cc: linux-xfs@vger.kernel.org Subject: Re: [PATCH v3 12/19] xfs: Factor up trans roll in xfs_attr3_leaf_clearflag Message-ID: <20190920135129.GJ40150@bfoster> References: <20190905221837.17388-1-allison.henderson@oracle.com> <20190905221837.17388-13-allison.henderson@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190905221837.17388-13-allison.henderson@oracle.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Fri, 20 Sep 2019 13:51:31 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Thu, Sep 05, 2019 at 03:18:30PM -0700, Allison Collins wrote: > New delayed allocation routines cannot be handling > transactions so factor them up into the calling functions > > Signed-off-by: Allison Collins > --- > fs/xfs/libxfs/xfs_attr.c | 14 ++++++++++++++ > fs/xfs/libxfs/xfs_attr_leaf.c | 5 +---- > 2 files changed, 15 insertions(+), 4 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c > index 5e5b688..781dd8a 100644 > --- a/fs/xfs/libxfs/xfs_attr.c > +++ b/fs/xfs/libxfs/xfs_attr.c > @@ -783,6 +783,12 @@ xfs_attr_leaf_addname(struct xfs_da_args *args) > * Added a "remote" value, just clear the incomplete flag. > */ > error = xfs_attr3_leaf_clearflag(args); Need an error check here now that this isn't the last call in the function before we return. Brian > + > + /* > + * Commit the flag value change and start the next trans in > + * series. > + */ > + error = xfs_trans_roll_inode(&args->trans, args->dp); > } > return error; > } > @@ -1140,6 +1146,14 @@ xfs_attr_node_addname( > error = xfs_attr3_leaf_clearflag(args); > if (error) > goto out; > + > + /* > + * Commit the flag value change and start the next trans in > + * series. > + */ > + error = xfs_trans_roll_inode(&args->trans, args->dp); > + if (error) > + goto out; > } > retval = error = 0; > > diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c > index 79650c9..786b851 100644 > --- a/fs/xfs/libxfs/xfs_attr_leaf.c > +++ b/fs/xfs/libxfs/xfs_attr_leaf.c > @@ -2750,10 +2750,7 @@ xfs_attr3_leaf_clearflag( > XFS_DA_LOGRANGE(leaf, name_rmt, sizeof(*name_rmt))); > } > > - /* > - * Commit the flag value change and start the next trans in series. > - */ > - return xfs_trans_roll_inode(&args->trans, args->dp); > + return error; > } > > /* > -- > 2.7.4 >