mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-11 03:31:17 +00:00
btrfs-progs: cleanup, mark more functions static
Reported by sparse. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
8ede30c220
commit
fe2657a707
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#define FIELD_BUF_LEN 80
|
#define FIELD_BUF_LEN 80
|
||||||
|
|
||||||
struct extent_buffer *debug_corrupt_block(struct btrfs_root *root, u64 bytenr,
|
static struct extent_buffer *debug_corrupt_block(struct btrfs_root *root,
|
||||||
u32 blocksize, u64 copy)
|
u64 bytenr, u32 blocksize, u64 copy)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct extent_buffer *eb;
|
struct extent_buffer *eb;
|
||||||
@ -880,7 +880,7 @@ static int delete_csum(struct btrfs_root *root, u64 bytenr, u64 bytes)
|
|||||||
* If using COW, chunk recover will use the old item to recover,
|
* If using COW, chunk recover will use the old item to recover,
|
||||||
* which is still OK but we want to check the ability to rebuild chunk
|
* which is still OK but we want to check the ability to rebuild chunk
|
||||||
* not only restore the old ones */
|
* not only restore the old ones */
|
||||||
int corrupt_item_nocow(struct btrfs_trans_handle *trans,
|
static int corrupt_item_nocow(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root, struct btrfs_path *path,
|
struct btrfs_root *root, struct btrfs_path *path,
|
||||||
int del)
|
int del)
|
||||||
{
|
{
|
||||||
@ -913,7 +913,7 @@ int corrupt_item_nocow(struct btrfs_trans_handle *trans,
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
int corrupt_chunk_tree(struct btrfs_trans_handle *trans,
|
static int corrupt_chunk_tree(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root)
|
struct btrfs_root *root)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -986,7 +986,7 @@ free_out:
|
|||||||
btrfs_free_path(path);
|
btrfs_free_path(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
int find_chunk_offset(struct btrfs_root *root,
|
static int find_chunk_offset(struct btrfs_root *root,
|
||||||
struct btrfs_path *path, u64 offset)
|
struct btrfs_path *path, u64 offset)
|
||||||
{
|
{
|
||||||
struct btrfs_key key;
|
struct btrfs_key key;
|
||||||
|
@ -186,7 +186,7 @@ static u64 first_extent_gap(struct rb_root *holes)
|
|||||||
return hole->start;
|
return hole->start;
|
||||||
}
|
}
|
||||||
|
|
||||||
int compare_hole(struct rb_node *node1, struct rb_node *node2)
|
static int compare_hole(struct rb_node *node1, struct rb_node *node2)
|
||||||
{
|
{
|
||||||
struct file_extent_hole *hole1;
|
struct file_extent_hole *hole1;
|
||||||
struct file_extent_hole *hole2;
|
struct file_extent_hole *hole2;
|
||||||
|
@ -507,7 +507,7 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmd_device_usage(int argc, char **argv)
|
static int cmd_device_usage(int argc, char **argv)
|
||||||
{
|
{
|
||||||
unsigned unit_mode;
|
unsigned unit_mode;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -52,7 +52,7 @@ static const char * const cmd_rescue_super_recover_usage[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int cmd_rescue_chunk_recover(int argc, char *argv[])
|
static int cmd_rescue_chunk_recover(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char *file;
|
char *file;
|
||||||
@ -112,7 +112,7 @@ int cmd_rescue_chunk_recover(int argc, char *argv[])
|
|||||||
* 3 : Fail to Recover bad supeblocks
|
* 3 : Fail to Recover bad supeblocks
|
||||||
* 4 : Abort to recover bad superblocks
|
* 4 : Abort to recover bad superblocks
|
||||||
*/
|
*/
|
||||||
int cmd_rescue_super_recover(int argc, char **argv)
|
static int cmd_rescue_super_recover(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
@ -159,7 +159,7 @@ static const char * const cmd_rescue_zero_log_usage[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int cmd_rescue_zero_log(int argc, char **argv)
|
static int cmd_rescue_zero_log(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct btrfs_root *root;
|
struct btrfs_root *root;
|
||||||
struct btrfs_trans_handle *trans;
|
struct btrfs_trans_handle *trans;
|
||||||
|
@ -277,7 +277,7 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int verify_dir_item(struct btrfs_root *root,
|
static int verify_dir_item(struct btrfs_root *root,
|
||||||
struct extent_buffer *leaf,
|
struct extent_buffer *leaf,
|
||||||
struct btrfs_dir_item *dir_item)
|
struct btrfs_dir_item *dir_item)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user