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=-5.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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 B8963C2D0CE for ; Wed, 1 Jan 2020 01:02:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8F6BC206E4 for ; Wed, 1 Jan 2020 01:02:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="h6e1aLED" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727188AbgAABCx (ORCPT ); Tue, 31 Dec 2019 20:02:53 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:45140 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbgAABCw (ORCPT ); Tue, 31 Dec 2019 20:02:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 0010x7tR085431 for ; Wed, 1 Jan 2020 01:02:51 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=7qOWEokU9vVZme6+CH+JnEUecKPvfIo36I/JuUJoT/0=; b=h6e1aLEDknkl5F8lw2jH8b9+TPPTheCzBUBtaIdgCWGYEn2oTrS9Fu2NeiXy4oLBuyiH zLoUZto7OVxgsOgm038sAHT+EPFu6Nu82vaKxtLDB6zprSjmS45egsu8k9fiy+H9jum4 lkvHagL9m3VJyOHydHp9QoTOE4CZ1/d3337wgkYv+3B8keMM7BN7MiPjNWdEDngY4jC4 WlY0n0zFJVOCBnRf2kolvwDw0gRqUi1ARJAOwaFvclzNko/JVFDqRYcGI+ufbD7P7Aa3 u9JdJd/lV47pd+66mIgtIutRqsG4ZJ5HtRq+99AiIv925EcdYusYG7bFJnvplG/bldTn Cw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2x5ypqjw46-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 01 Jan 2020 01:02:51 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 0010wwpI190646 for ; Wed, 1 Jan 2020 01:00:50 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2x8gued6f5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 01 Jan 2020 01:00:50 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 00110nSh002335 for ; Wed, 1 Jan 2020 01:00:49 GMT Received: from localhost (/10.159.150.156) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 31 Dec 2019 17:00:49 -0800 Subject: [PATCH v2 0/4] xfs: btree bulk loading From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Tue, 31 Dec 2019 17:00:46 -0800 Message-ID: <157784044590.1357300.12663203884553611459.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9487 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=805 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001010007 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9487 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=865 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001010007 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 each of the btree root types (AG header and inode) 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, load records into new leaf blocks, compute the node blocks from that, and present the new root ready for commit. 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