From patchwork Thu Dec 12 04:17:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 11287053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59599112B for ; Thu, 12 Dec 2019 04:18:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3844F22B48 for ; Thu, 12 Dec 2019 04:18:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ah86Aufg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727891AbfLLESN (ORCPT ); Wed, 11 Dec 2019 23:18:13 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:50596 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727862AbfLLESN (ORCPT ); Wed, 11 Dec 2019 23:18:13 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBC4EIig144622 for ; Thu, 12 Dec 2019 04:18:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=qeEzDfW4D7O7QOEy33kmQ5MUyiTdr38GWNqHGV/E6pA=; b=ah86Aufgp80dLdBh25/ygTD5zh6HZ56yKBDL4WTfOfYT4oqISwiS46a/SD62H6MiAjB1 yHr3Cx1jImEiFShW7jjXzCjZBlx0x6rjezU+odtF2fR6F5U7zo2L7WfVIoq6jxTxVdCF OWIzV0ejUqUgErHsNv0OIC1YsVOYnVaODPcH+5a0OfUJekxnvUewO1uEUJo73whbcdfw vsvIVzc2bZ0/uQImgXJ8UNQds0gJC3UAHm4artLsjSttG1OV84e4ywWIhqt8EHm4UXO8 kDTjkOgmdekBoMJ9F43a2YbtPkssiJoXFgT8in/s9TC3ZfQI+PFz9b7sWVgHA37HBoGt Vg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2wrw4ndbkv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 12 Dec 2019 04:18:11 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xBC4E7ud128127 for ; Thu, 12 Dec 2019 04:18:11 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2wu5cs3h3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 12 Dec 2019 04:18:10 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xBC4I9fn026322 for ; Thu, 12 Dec 2019 04:18:10 GMT Received: from localhost.localdomain (/67.1.205.161) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 11 Dec 2019 20:18:09 -0800 From: Allison Collins To: linux-xfs@vger.kernel.org Subject: [PATCH v5 09/14] xfsprogs: Factor up trans roll from xfs_attr3_leaf_setflag Date: Wed, 11 Dec 2019 21:17:58 -0700 Message-Id: <20191212041803.14018-10-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191212041803.14018-1-allison.henderson@oracle.com> References: <20191212041803.14018-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9468 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=938 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912120022 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9468 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-1912120022 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org New delayed allocation routines cannot be handling transactions so factor them up into the calling functions Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster --- libxfs/xfs_attr.c | 5 +++++ libxfs/xfs_attr_leaf.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 4327ef1..442f549 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -1205,6 +1205,11 @@ xfs_attr_node_removename( error = xfs_attr3_leaf_setflag(args); if (error) goto out; + + error = xfs_trans_roll_inode(&args->trans, args->dp); + if (error) + goto out; + error = xfs_attr_rmtval_remove(args); if (error) goto out; diff --git a/libxfs/xfs_attr_leaf.c b/libxfs/xfs_attr_leaf.c index 19566da..67a1349 100644 --- a/libxfs/xfs_attr_leaf.c +++ b/libxfs/xfs_attr_leaf.c @@ -2780,10 +2780,7 @@ xfs_attr3_leaf_setflag( 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; } /*