aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/dev-replace.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-01Btrfs: Make BTRFS_DEV_REPLACE_DEVID an unsigned long long constantGeert Uytterhoeven1-1/+1
The internal btrfs device id is a u64, hence make the constant BTRFS_DEV_REPLACE_DEVID "unsigned long long" as well, so we no longer need a cast to print it. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2013-09-01Btrfs: Remove superfluous casts from u64 to unsigned long longGeert Uytterhoeven1-1/+1
u64 is "unsigned long long" on all architectures now, so there's no need to cast it when formatting it using the "ll" length modifier. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Chris Mason <[email protected]>
2013-07-15PTR_RET is now PTR_ERR_OR_ZERO(): Replace most.Rusty Russell1-1/+1
Sweep of the simple cases. Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Julia Lawall <[email protected]> Signed-off-by: Rusty Russell <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]>
2013-06-14Btrfs: introduce per-subvolume ordered extent listMiao Xie1-2/+2
The reason we introduce per-subvolume ordered extent list is the same as the per-subvolume delalloc inode list. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
2013-06-14Btrfs: introduce per-subvolume delalloc inode listMiao Xie1-1/+1
When we create a snapshot, we need flush all delalloc inodes in the fs, just flushing the inodes in the source tree is OK. So we introduce per-subvolume delalloc inode list. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
2013-05-17Btrfs: don't allow device replace on RAID5/RAID6Stefan Behrens1-0/+5
This is not yet supported and causes crashes. One sad user reported that it destroyed his filesystem. One failure is in __btrfs_map_block+0xc1f calling kmalloc(0). 0x5f21f is in __btrfs_map_block (fs/btrfs/volumes.c:4923). 4918 num_stripes = map->num_stripes; 4919 max_errors = nr_parity_stripes(map); 4920 4921 raid_map = kmalloc(sizeof(u64) * num_stripes, 4922 GFP_NOFS); 4923 if (!raid_map) { 4924 ret = -ENOMEM; 4925 goto out; 4926 } 4927 There might be more issues. Until this is really tested, don't allow users to start the procedure on RAID5/RAID6 filesystems. Signed-off-by: Stefan Behrens <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
2013-02-20Btrfs: check the return value of btrfs_start_delalloc_inodes()Miao Xie1-1/+5
We forget to check the return value of btrfs_start_delalloc_inodes(), fix it. Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
2012-12-12Btrfs: add new sources for device replace codeStefan Behrens1-0/+856
This adds a new file to the sources together with the header file and the changes to ioctl.h and ctree.h that are required by the new C source file. Additionally, 4 new functions are added to volume.c that deal with device creation and destruction. Signed-off-by: Stefan Behrens <[email protected]> Signed-off-by: Chris Mason <[email protected]>