diff mbox

[15/37] mke2fs: set block_validity as a default mount option

Message ID 20140501231400.31890.27469.stgit@birch.djwong.org
State Superseded, archived
Headers show

Commit Message

Darrick Wong May 1, 2014, 11:14 p.m. UTC
The block_validity mount option spot-checks block allocations against
a bitmap of known group metadata blocks.  This helps us to prevent
self-inflicted catastrophic failures such as trying to "share"
critical metadata (think bitmaps) with file data, which usually
results in filesystem destruction.

In order to test the overhead of the mount option, I re-used the speed
tests in the metadata checksum testing script.  In short, the program
creates what looks like 15 copies of a kernel source tree, except that
it uses fallocate to strip out the overhead of writing the file data
so that we can focus on metadata overhead.  On a 64G RAM disk, the
overhead was generally about 0.9% and at most 1.6%.  On a 160G USB
disk, the overhead was about 0.8% and peaked at 1.2%.

When I changed the test to write out files instead of merely
fallocating space, the overhead was negligible.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 misc/mke2fs.conf.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Lukas Czerner May 5, 2014, 5:24 p.m. UTC | #1
On Thu, 1 May 2014, Darrick J. Wong wrote:

> Date: Thu, 01 May 2014 16:14:00 -0700
> From: Darrick J. Wong <darrick.wong@oracle.com>
> To: tytso@mit.edu, darrick.wong@oracle.com
> Cc: linux-ext4@vger.kernel.org
> Subject: [PATCH 15/37] mke2fs: set block_validity as a default mount option
> 
> The block_validity mount option spot-checks block allocations against
> a bitmap of known group metadata blocks.  This helps us to prevent
> self-inflicted catastrophic failures such as trying to "share"
> critical metadata (think bitmaps) with file data, which usually
> results in filesystem destruction.
> 
> In order to test the overhead of the mount option, I re-used the speed
> tests in the metadata checksum testing script.  In short, the program
> creates what looks like 15 copies of a kernel source tree, except that
> it uses fallocate to strip out the overhead of writing the file data
> so that we can focus on metadata overhead.  On a 64G RAM disk, the
> overhead was generally about 0.9% and at most 1.6%.  On a 160G USB
> disk, the overhead was about 0.8% and peaked at 1.2%.
> 
> When I changed the test to write out files instead of merely
> fallocating space, the overhead was negligible.

I like that, but I think we need to run more performance testing on
that to make sure that it really does not break something.

Eric, will you be able to run your performance tests with
block_validity option and compare it with baseline to see whether it
really does not change anything ?

I'll try to run my tests as well.

We really need generic performance test suite, I hope that Dave will
send his performance addition to xfstests soon so we can start
adding tests.

Thanks!
-Lukas

> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  misc/mke2fs.conf.in |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
> index 4c5dba7..de0250d 100644
> --- a/misc/mke2fs.conf.in
> +++ b/misc/mke2fs.conf.in
> @@ -1,6 +1,6 @@
>  [defaults]
>  	base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
> -	default_mntopts = acl,user_xattr
> +	default_mntopts = acl,user_xattr,block_validity
>  	enable_periodic_fsck = 0
>  	blocksize = 4096
>  	inode_size = 256
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in
index 4c5dba7..de0250d 100644
--- a/misc/mke2fs.conf.in
+++ b/misc/mke2fs.conf.in
@@ -1,6 +1,6 @@ 
 [defaults]
 	base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
-	default_mntopts = acl,user_xattr
+	default_mntopts = acl,user_xattr,block_validity
 	enable_periodic_fsck = 0
 	blocksize = 4096
 	inode_size = 256