From patchwork Thu Nov 1 23:19:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10664671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 09BF617DB for ; Thu, 1 Nov 2018 23:19:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC0F92C51A for ; Thu, 1 Nov 2018 23:19:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E090A2C515; Thu, 1 Nov 2018 23:19:32 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 9CEB92C512 for ; Thu, 1 Nov 2018 23:19:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728148AbeKBIYd (ORCPT ); Fri, 2 Nov 2018 04:24:33 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:52988 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727749AbeKBIYd (ORCPT ); Fri, 2 Nov 2018 04:24:33 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA1NJ1ED134419; Thu, 1 Nov 2018 23:19:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=sdg03FQZO8Oc9IMiFk+F0Ev8xDnv/Za5GqiYyyUpIx4=; b=nvJ4IcwwKDHwNTZ3bNE7dToYSgKHCqEa83g9ps2xyIt5RJySj8gC7a4Txaydf4PjgT5C lkiPK4QbHE1/iFtQWLHlJSvhGXt9cIrxZ4Ub6LAC5/wIAT63tJVIJW+KX9KKWWQSP0F9 uD7H7kI39JczXoczYSTbwk+9awQcPsHSeT41p5JUySncLlArn5C/x+CRYC13bTlJS1kL Uf/Id+s6hD8DbtxluhVKBy1y0imrOA0k9BW40DAs17TyYto2ebf4qtOWDzaMiWbujomt emzRcaFv0vB+yksppMJJapg8wUOt8SOdvNjmh5sAFexnJZIAXAEvwLZR+jfyOWNuOKP+ PQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2ncfyqbps4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Nov 2018 23:19:30 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wA1NJTN3010821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Nov 2018 23:19:29 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wA1NJTu3005641; Thu, 1 Nov 2018 23:19:29 GMT Received: from localhost (/10.145.178.77) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Nov 2018 16:19:28 -0700 Subject: [PATCH 4/8] dump: don't fail if multi-file dumps don't all contain quota info From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Thu, 01 Nov 2018 16:19:27 -0700 Message-ID: <154111436733.6577.618179444183829859.stgit@magnolia> In-Reply-To: <154111434286.6577.15010861884505931015.stgit@magnolia> References: <154111434286.6577.15010861884505931015.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9064 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=926 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811010194 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 From: Darrick J. Wong When xfsdump is making multi-file dumps, the quota information are written into the last dump file. However, the multi-file restore script (as written) expects to see quota information restored by every dump file and fails. This is silly, so fix it. Signed-off-by: Darrick J. Wong --- common/dump | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/dump b/common/dump index b6b7fb46..c45b8a5a 100644 --- a/common/dump +++ b/common/dump @@ -1432,16 +1432,19 @@ _check_quota() print "Found extra:", $0 } next + } + $0 ~ "Restore Status: INCOMPLETE" { + incomplete = 1 } { print } END { - if (uquota && !found_uquota) { + if (uquota && !found_uquota && !incomplete) { print "Missing user quota msg:", usermsg } - if (gquota && !found_gquota) { + if (gquota && !found_gquota && !incomplete) { print "Missing group quota msg:", groupmsg } - if (pquota && !found_pquota) { + if (pquota && !found_pquota && !incomplete) { print "Missing project quota msg:", projectmsg } }