Btrfs-progs: mkfs: Remove 'zero_end =1' since it has been set to a value
authorLi Yang <liyang.fnst@cn.fujitsu.com>
Mon, 21 Apr 2014 09:38:08 +0000 (05:38 -0400)
committerDavid Sterba <dsterba@suse.cz>
Fri, 2 May 2014 15:03:56 +0000 (17:03 +0200)
In utils.c, zero_end is used as a parameter, should not force it to 1.
In mkfs.c, zero_end is set to 1 or 0(-b) at the beginning, should not
force it to 1 unconditionally.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
mkfs.c
utils.c

diff --git a/mkfs.c b/mkfs.c
index dbd83f5ce1682b88fe778aeacfabad9d126a962f..f2b577922c9e925a90ea4b7109da36fda380e1b3 100644 (file)
--- a/mkfs.c
+++ b/mkfs.c
@@ -1543,7 +1543,6 @@ int main(int ac, char **av)
 
        btrfs_register_one_device(file);
 
-       zero_end = 1;
        while (dev_cnt-- > 0) {
                int old_mixed = mixed;
 
diff --git a/utils.c b/utils.c
index 44c0e4ab39f22447d9560acbfd15042d457d88a2..29953d9dd2a90d72fc6ec4a0eab9616404ef9d09 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -613,7 +613,6 @@ int btrfs_prepare_device(int fd, char *file, int zero_end, u64 *block_count_ret,
        }
        if (max_block_count)
                block_count = min(block_count, max_block_count);
-       zero_end = 1;
 
        if (block_count < 1024 * 1024 * 1024 && !(*mixed)) {
                printf("SMALL VOLUME: forcing mixed metadata/data groups\n");