FS#32393 - [linux] Please enable btrfs integrity checking

Attached to Project: Arch Linux
Opened by Vorbote (vorbote) - Friday, 02 November 2012, 12:37 GMT
Last edited by Dave Reisner (falconindy) - Friday, 02 November 2012, 17:22 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The feature CONFIG_BTRFS_FS_CHECK_INTEGRITY reduces dramatically the risk of runtime data corruption when using a btrfs filesystem; I've been bitten by this, thus I give it a severy high. It would be great to have this available in Arch kernels. The full explanation is available in the original LKML posting[1].

[1] http://thread.gmane.org/gmane.comp.file-systems.btrfs/14212/focus=14213
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 02 November 2012, 17:22 GMT
Reason for closing:  Won't implement
Additional comments about closing:  "Enabling this functionality is not intended for normal use"
Comment by Vorbote (vorbote) - Friday, 02 November 2012, 12:39 GMT
Make that http://thread.gmane.org/gmane.comp.file-systems.btrfs/14212/focus=14212 (Why can't flyspray allow editing?).
Comment by Dave Reisner (falconindy) - Friday, 02 November 2012, 15:27 GMT
This is a bad idea. I doubt you read the Kconfig for this option.

http://article.gmane.org/gmane.comp.file-systems.btrfs/14215

+config BTRFS_FS_CHECK_INTEGRITY
+ bool "Btrfs with integrity check tool compiled in (DANGEROUS)"
+ depends on BTRFS_FS
+ help
+ Adds code that examines all block write requests (including
+ writes of the super block). The goal is to verify that the
+ state of the filesystem on disk is always consistent, i.e.,
+ after a power-loss or kernel panic event the filesystem is
+ in a consistent state. In order to check this, three rules
+ are verified:
+ 1. It is not allowed to write a disk block which is
+ currently referenced by the super block (either directly
+ or indirectly).
+ 2. When a super block is written, it is verified that all
+ referenced (directly or indirectly) blocks fulfill the
+ following requirements:
+ 2a. All referenced blocks have either been present when
+ the file system was mounted, (i.e., they have been
+ referenced by the super block) or they have been
+ written since then and the write completion callback
+ was called.
+ 2b. All referenced blocks need to have a generation
+ number which is equal to the parent's number.
+
+ If the integrity check tool is included and activated in
+ the mount options, plenty of kernel memory is used, and
+ plenty of additional CPU cycles are spent. Enabling this
+ functionality is not intended for normal use.
+
+ In most cases, unless you are a btrfs developer who needs
+ to verify the integrity of (super)-block write requests
+ during the run of a regression test, say N

Loading...