From patchwork Wed Mar 20 00:45:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10860635 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 356761515 for ; Wed, 20 Mar 2019 00:45:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AEC529987 for ; Wed, 20 Mar 2019 00:45:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEF5C2998D; Wed, 20 Mar 2019 00:45:43 +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=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 9507529987 for ; Wed, 20 Mar 2019 00:45:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbfCTApn (ORCPT ); Tue, 19 Mar 2019 20:45:43 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:52432 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726835AbfCTApn (ORCPT ); Tue, 19 Mar 2019 20:45:43 -0400 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 x2K0d6K9168031; Wed, 20 Mar 2019 00:45:41 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=zXhbPM1HqhBgeSPU+ubmDFnyQnCENqOBitAdTlBpVww=; b=SXoQ0zlE+F5J03mDOHnSbung6xpwlLqhnztMa+7rT0WFH/33+Hjeo4y0btAuN2rLkB9U cQoFCaYLFDGwRUTByeuUnvca1PBYDAmxP6xklyrtoFUWQeDiLJsVwZDAYBAut1qLQXQj XToF0OPTuZNI96IfSAQ6a9pSkxDbn+3+2Ngd3T2GnSVuL0CJSO/b9tEftciWfop+dR6/ S/cQNw1IvpD823Eu+g/r8f6wrOdxsK1IVfRWC3bv8PHoLrmdhy1bgIXHbZR+8cdro1zs pHn6fr5EJVHLNUIILpsvDlpbRJpPpaF7rcw0yXdNlqrZgpvoK0WP8FFv97JJkEleOtU7 Fw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2r8rjuqwxn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 00:45:41 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x2K0jZOV016736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 00:45:35 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x2K0jZsa004199; Wed, 20 Mar 2019 00:45:35 GMT Received: from localhost (/10.159.245.168) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Mar 2019 17:45:34 -0700 Subject: [PATCH 08/12] common/populate: support multiple cached images From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 19 Mar 2019 17:45:35 -0700 Message-ID: <155304273502.31707.11442947133103113710.stgit@magnolia> In-Reply-To: <155304267647.31707.14180452399822113095.stgit@magnolia> References: <155304267647.31707.14180452399822113095.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9200 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1810050000 definitions=main-1903200003 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Enhance the populated fs metadump image cache to support multiple configurations per filesystem so that we reduce the image creation overhead even further. Signed-off-by: Darrick J. Wong --- common/populate | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/populate b/common/populate index 1f921ac5..4fa118f0 100644 --- a/common/populate +++ b/common/populate @@ -805,10 +805,12 @@ _scratch_populate_restore_cached() { # Populate a scratch FS from scratch or from a cached image. _scratch_populate_cached() { local meta_descr="$(_scratch_populate_cache_tag "$@")" + local meta_tag="$(echo "${meta_descr}" | md5sum - | cut -d ' ' -f 1)" + local metadump_stem="${TEST_DIR}/__populate.${FSTYP}.${meta_tag}" # These variables are shared outside this function - POPULATE_METADUMP="${TEST_DIR}/__populate.${FSTYP}" - POPULATE_METADUMP_DESCR="${TEST_DIR}/__populate.${FSTYP}.txt" + POPULATE_METADUMP="${metadump_stem}.metadump" + POPULATE_METADUMP_DESCR="${metadump_stem}.txt" # Don't keep metadata images cached for more 48 hours... rm -rf "$(find "${POPULATE_METADUMP}" -mtime +2 2>/dev/null)"