diff options
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index c1a22178c6e8..a191bac31d85 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -46,6 +46,7 @@ static int init_first_rw_device(struct btrfs_trans_handle *trans, | |||
46 | struct btrfs_device *device); | 46 | struct btrfs_device *device); |
47 | static int btrfs_relocate_sys_chunks(struct btrfs_root *root); | 47 | static int btrfs_relocate_sys_chunks(struct btrfs_root *root); |
48 | static void __btrfs_reset_dev_stats(struct btrfs_device *dev); | 48 | static void __btrfs_reset_dev_stats(struct btrfs_device *dev); |
49 | static void btrfs_dev_stat_print_on_error(struct btrfs_device *dev); | ||
49 | static void btrfs_dev_stat_print_on_load(struct btrfs_device *device); | 50 | static void btrfs_dev_stat_print_on_load(struct btrfs_device *device); |
50 | 51 | ||
51 | static DEFINE_MUTEX(uuid_mutex); | 52 | static DEFINE_MUTEX(uuid_mutex); |
@@ -1199,10 +1200,10 @@ out: | |||
1199 | return ret; | 1200 | return ret; |
1200 | } | 1201 | } |
1201 | 1202 | ||
1202 | int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, | 1203 | static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, |
1203 | struct btrfs_device *device, | 1204 | struct btrfs_device *device, |
1204 | u64 chunk_tree, u64 chunk_objectid, | 1205 | u64 chunk_tree, u64 chunk_objectid, |
1205 | u64 chunk_offset, u64 start, u64 num_bytes) | 1206 | u64 chunk_offset, u64 start, u64 num_bytes) |
1206 | { | 1207 | { |
1207 | int ret; | 1208 | int ret; |
1208 | struct btrfs_path *path; | 1209 | struct btrfs_path *path; |
@@ -1329,9 +1330,9 @@ error: | |||
1329 | * the device information is stored in the chunk root | 1330 | * the device information is stored in the chunk root |
1330 | * the btrfs_device struct should be fully filled in | 1331 | * the btrfs_device struct should be fully filled in |
1331 | */ | 1332 | */ |
1332 | int btrfs_add_device(struct btrfs_trans_handle *trans, | 1333 | static int btrfs_add_device(struct btrfs_trans_handle *trans, |
1333 | struct btrfs_root *root, | 1334 | struct btrfs_root *root, |
1334 | struct btrfs_device *device) | 1335 | struct btrfs_device *device) |
1335 | { | 1336 | { |
1336 | int ret; | 1337 | int ret; |
1337 | struct btrfs_path *path; | 1338 | struct btrfs_path *path; |
@@ -1710,8 +1711,8 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info, | |||
1710 | mutex_unlock(&fs_info->fs_devices->device_list_mutex); | 1711 | mutex_unlock(&fs_info->fs_devices->device_list_mutex); |
1711 | } | 1712 | } |
1712 | 1713 | ||
1713 | int btrfs_find_device_by_path(struct btrfs_root *root, char *device_path, | 1714 | static int btrfs_find_device_by_path(struct btrfs_root *root, char *device_path, |
1714 | struct btrfs_device **device) | 1715 | struct btrfs_device **device) |
1715 | { | 1716 | { |
1716 | int ret = 0; | 1717 | int ret = 0; |
1717 | struct btrfs_super_block *disk_super; | 1718 | struct btrfs_super_block *disk_super; |
@@ -3607,7 +3608,7 @@ static int btrfs_cmp_device_info(const void *a, const void *b) | |||
3607 | return 0; | 3608 | return 0; |
3608 | } | 3609 | } |
3609 | 3610 | ||
3610 | struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = { | 3611 | static struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = { |
3611 | [BTRFS_RAID_RAID10] = { | 3612 | [BTRFS_RAID_RAID10] = { |
3612 | .sub_stripes = 2, | 3613 | .sub_stripes = 2, |
3613 | .dev_stripes = 1, | 3614 | .dev_stripes = 1, |
@@ -5120,9 +5121,9 @@ struct async_sched { | |||
5120 | * This will add one bio to the pending list for a device and make sure | 5121 | * This will add one bio to the pending list for a device and make sure |
5121 | * the work struct is scheduled. | 5122 | * the work struct is scheduled. |
5122 | */ | 5123 | */ |
5123 | noinline void btrfs_schedule_bio(struct btrfs_root *root, | 5124 | static noinline void btrfs_schedule_bio(struct btrfs_root *root, |
5124 | struct btrfs_device *device, | 5125 | struct btrfs_device *device, |
5125 | int rw, struct bio *bio) | 5126 | int rw, struct bio *bio) |
5126 | { | 5127 | { |
5127 | int should_queue = 1; | 5128 | int should_queue = 1; |
5128 | struct btrfs_pending_bios *pending_bios; | 5129 | struct btrfs_pending_bios *pending_bios; |
@@ -5940,7 +5941,7 @@ void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index) | |||
5940 | btrfs_dev_stat_print_on_error(dev); | 5941 | btrfs_dev_stat_print_on_error(dev); |
5941 | } | 5942 | } |
5942 | 5943 | ||
5943 | void btrfs_dev_stat_print_on_error(struct btrfs_device *dev) | 5944 | static void btrfs_dev_stat_print_on_error(struct btrfs_device *dev) |
5944 | { | 5945 | { |
5945 | if (!dev->dev_stats_valid) | 5946 | if (!dev->dev_stats_valid) |
5946 | return; | 5947 | return; |