summaryrefslogtreecommitdiff
path: root/btrfs.c
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2010-11-19 16:05:27 +0100
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:32 -0400
commit42f9568bfdbec6a294320b955e28ccd9c7178a01 (patch)
tree5f1b38a4f75485c1d0632e817f78f67fc8346243 /btrfs.c
parentc55248003ca39fa5d102c795474029bf1cfec999 (diff)
mkfs should initialize unused fields properly
we discovered speed setting is (probably unintentionally) initialized to 1 in make_btrfs(), while being initialized to 0 in btrfs_add_to_fsid(). initialization in make_btrfs() is due to reuse of buf after pwrite() without clearing it. consequently, code like btrfs_set_extent_generation(buf, extent_item, 1); writes to the same location in buf where speed will be placed, later. It may be a good idea to clear buf after each pwrite(), though leaving the struct btrfs_header intact. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
Diffstat (limited to 'btrfs.c')
0 files changed, 0 insertions, 0 deletions