From patchwork Thu May 7 01:01:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11532265 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 6AA481392 for ; Thu, 7 May 2020 01:01:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5116D20708 for ; Thu, 7 May 2020 01:01:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="kiwGnInM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbgEGBBx (ORCPT ); Wed, 6 May 2020 21:01:53 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:51606 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727819AbgEGBBx (ORCPT ); Wed, 6 May 2020 21:01:53 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0470xFAJ123102; Thu, 7 May 2020 01:01:45 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-2020-01-29; bh=6IpX3+B42RxD7S1fKjAcEf4u/95Klc2hvVojsM3UamI=; b=kiwGnInMAHsNWF9bU0dCcAkXDKEFTWUzVgyuSaeX9bLmANV5JAkxv6aV1wIOIe19mymE P1X6qc4ZkKcS06wtX5nc7/ECnfpYEbI638H+c+GvZOmtAVFs9X2pWAHNYExRdVuI9+Sg hzG1b5w2lTmGvQI/iJPY52yqDaFyoGVl5NxjceBfoYIDnaFHJZ4h+B80Futl5319Ocp8 PAnCfgxUeatbbmcsXeU+IQHPE35+/+xiAjKlapeCoWg6uTr3ZfwRi/hy5CqrxqNDlDcN UPxlkc2crStRsgPZ41SpxjGIHG2A6NnOzEFYD6LXaAomevDlqqJIpXEqQvGFsg4z4IBo dA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 30usgq4jc5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 May 2020 01:01:45 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0470upt5190180; Thu, 7 May 2020 01:01:45 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 30sjdwssbj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 May 2020 01:01:45 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 04711hJl003913; Thu, 7 May 2020 01:01:43 GMT Received: from localhost (/10.159.237.186) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 06 May 2020 18:01:43 -0700 Subject: [PATCH v4 00/25] xfs: refactor log recovery From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: Chandan Babu R , Christoph Hellwig , Christoph Hellwig , linux-xfs@vger.kernel.org Date: Wed, 06 May 2020 18:01:39 -0700 Message-ID: <158881329912.189971.14392758631836955942.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070004 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9613 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070004 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi all, This series refactors log recovery by moving recovery code for each log item type into the source code for the rest of that log item type and using dispatch function pointers to virtualize the interactions. This dramatically reduces the amount of code in xfs_log_recover.c and increases cohesion throughout the log code. In this second version, we dispense with the extra indirection for log intent items. During log recovery pass 2, committing of the recovered intent and intent-done items is done directly by creating xlog_recover_item_types for all intent types. The recovery functions that do the work are now called directly through the xfs_log_item ops structure. Recovery item sorting is less intrusive, and the buffer and inode recovery code are in separate files now. The third version has changes for various minor review comments. 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=refactor-log-recovery