From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:47106 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750971AbdFBWat (ORCPT ); Fri, 2 Jun 2017 18:30:49 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v52MUm4Q027062 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 2 Jun 2017 22:30:49 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v52MUlCu027133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 2 Jun 2017 22:30:48 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v52MUlRf000446 for ; Fri, 2 Jun 2017 22:30:47 GMT Subject: [PATCH v7 00/19] xfs: online scrub support From: "Darrick J. Wong" Date: Fri, 02 Jun 2017 15:30:46 -0700 Message-ID: <149644264601.19430.6064928774771048026.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Hi all, This is the seventh revision of a patchset that adds to XFS kernel support for online metadata scrubbing and repair. There aren't any on-disk format changes. Changes since v6 include refactoring the scrub setup code, fixing a deadlock problem in the xattr scrubber, and strengthening the cross-referencing checks. I have been performing weekly online scrubs of my XFS filesystems for several months now, with surprisingly few problems. Online scrub/repair support consists of four major pieces -- first, an ioctl that maps physical extents to their owners (GETFSMAP; already in 4.12); second, various in-kernel metadata scrubbing ioctls to examine metadata records and cross-reference them with other filesystem metadata; third, an in-kernel mechanism for rebuilding damaged metadata objects and btrees; and fourth, a userspace component to coordinate scrubbing and repair operations. This new utility, xfs_scrub, is separate from the existing offline xfs_repair tool. The program uses various XFS ioctls to iterate all XFS metadata and asks the kernel to check the metadata and repair it if necessary. Per reviewer request, the v7 patch series has been broken into multiple smaller series -- the first one makes all the libxfs changes necessary to support scrub and the second series adds the scrub functionality. A similar split will be applied to the cross-referencing checks and the repair functions the next time they are posted. If you're going to start using this mess, you probably ought to just pull from my git trees. The kernel patches[1] should apply against 4.12-rc3. xfsprogs[2] and xfstests[3] can be found in their usual places. The git trees contain all four series' worth of changes. This is an extraordinary way to eat your data. Enjoy! Comments and questions are, as always, welcome. --D [1] https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=djwong-devel [2] https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=djwong-devel [3] https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=djwong-devel