From patchwork Wed Oct 9 16:47:58 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: 11181579 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 298691668 for ; Wed, 9 Oct 2019 16:48:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0916921848 for ; Wed, 9 Oct 2019 16:48:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="eaQ/Uc/K" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731158AbfJIQsE (ORCPT ); Wed, 9 Oct 2019 12:48:04 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:54702 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730490AbfJIQsE (ORCPT ); Wed, 9 Oct 2019 12:48:04 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x99GjbPa003524 for ; Wed, 9 Oct 2019 16:48:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=50b1vKHsuEYIkyyJvtmfO3HFT5Y610LdxL2xpzD9Co8=; b=eaQ/Uc/KZ9t7SguRrofotEb/oUy1JLrrYnmpO3cHwGR4ZoFZZA/A+vGNMGmip6s0BvBs MBtsje6Vn9U0JNIUIJuTbutolA+AJSnAje0UNOrQH3fC5sPz+QVpIBdmkWRVl0zd+x7v YtcMGWLNhh8h50DwCQ6+w0k88a19OqkC3mGz5rKQC7BWxFsMAELPzCyKoL+V1b/KghEx fw2TP8ZZeasGHnrvR9E405k0OMekv/MIaioggEpF+b9KvjyvVjm13F069cck/4fTLg4Q 2JADkai6y7pfgo6ZOHJE9lKxFVxy0CLyPPxQ4TpEwymLDNbL+T3IlGhn5sQMzXMlCee5 yg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2vek4qnyjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 09 Oct 2019 16:48:02 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x99GjQOn111688 for ; Wed, 9 Oct 2019 16:48:01 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2vgev1tkva-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 09 Oct 2019 16:48:01 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x99Gm0ix020888 for ; Wed, 9 Oct 2019 16:48:00 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 09 Oct 2019 16:48:00 +0000 Subject: [PATCH 0/4] xfs: btree bulk loading From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Wed, 09 Oct 2019 09:47:58 -0700 Message-ID: <157063967800.2912204.4012307770844087647.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9405 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=767 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910090147 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9405 signatures=668684 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=849 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910090147 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi all, This series creates a bulk loading function for metadata btree cursors. We start by creating the idea of a "fake root" for the btree type so that we can use a special btree cursor to stage a new btree without altering anything that might already exist. Next, we add utility functions to compute the desired btree shape for a given number of records. Finally we extend all four per-AG btree cursor types to support staging cursors and therefore bulk loading. This will be used by upcoming patch series to implement online repair and refactor offline repair. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=btree-bulk-loading xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=btree-bulk-loading