OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f55684
)
Btrfs: set device->total_disk_bytes when adding new device
author
Yan Zheng
<zheng.yan@oracle.com>
Thu, 4 Jun 2009 13:23:50 +0000
(09:23 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 4 Jun 2009 13:23:57 +0000
(09:23 -0400)
It was not being properly initialized, and so the size saved to
disk was not correct.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/volumes.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index
5f01dad
..
a6d35b0
100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-1440,6
+1440,7
@@
int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
device->io_align = root->sectorsize;
device->sector_size = root->sectorsize;
device->total_bytes = i_size_read(bdev->bd_inode);
+ device->disk_total_bytes = device->total_bytes;
device->dev_root = root->fs_info->dev_root;
device->bdev = bdev;
device->in_fs_metadata = 1;