summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2021-08-24 13:27:42 +0800
committerDavid Sterba <dsterba@suse.com>2021-10-26 19:03:57 +0200
commita09f23c3554eec3451ce5d8891729b29b089e59f (patch)
tree6416b4d079b520ef1cd6ffb197ace0925dbadf9a /fs/btrfs/volumes.h
parent44bee215f72f13874c0e734a0712c2e3264c0108 (diff)
downloadlinux-a09f23c3554eec3451ce5d8891729b29b089e59f.tar.bz2
btrfs: rename and switch to bool btrfs_chunk_readonly
btrfs_chunk_readonly() checks if the given chunk is writeable. It returns 1 for readonly, and 0 for writeable. So the return argument type bool shall suffice instead of the current type int. Also, rename btrfs_chunk_readonly() to btrfs_chunk_writeable() as we check if the bg is writeable, and helps to keep the logic at the parent function simpler to understand. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 5314ce51b927..937a81f9f6e6 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -493,7 +493,7 @@ int btrfs_relocate_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset);
int btrfs_cancel_balance(struct btrfs_fs_info *fs_info);
int btrfs_create_uuid_tree(struct btrfs_fs_info *fs_info);
int btrfs_uuid_scan_kthread(void *data);
-int btrfs_chunk_readonly(struct btrfs_fs_info *fs_info, u64 chunk_offset);
+bool btrfs_chunk_writeable(struct btrfs_fs_info *fs_info, u64 chunk_offset);
int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes,
u64 *start, u64 *max_avail);
void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index);