diff options
author | Hans van Kranenburg <hans.van.kranenburg@mendix.com> | 2018-10-04 17:24:39 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 08:51:33 -0500 |
commit | 23f0ff1ec4b0b2860e9faaa98149bd4f30e82a18 (patch) | |
tree | 4d807da88a6486e72bd3bf78706e125ac370e715 /fs | |
parent | 2f29df4fc24ee3467f0073300d93a55499c7dd9f (diff) |
btrfs: alloc_chunk: improve chunk size variable name
The variable num_bytes is really a way too generic name for a variable
in this function. There are a dozen other variables that hold a number
of bytes as value.
Give it a name that actually describes what it does, which is holding
the size of the chunk that we're allocating.
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 405d8977a2b5..8c5ae9943d69 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -4632,7 +4632,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
4632 | u64 max_stripe_size; | 4632 | u64 max_stripe_size; |
4633 | u64 max_chunk_size; | 4633 | u64 max_chunk_size; |
4634 | u64 stripe_size; | 4634 | u64 stripe_size; |
4635 | u64 num_bytes; | 4635 | u64 chunk_size; |
4636 | int ndevs; | 4636 | int ndevs; |
4637 | int i; | 4637 | int i; |
4638 | int j; | 4638 | int j; |
@@ -4834,9 +4834,9 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
4834 | map->type = type; | 4834 | map->type = type; |
4835 | map->sub_stripes = sub_stripes; | 4835 | map->sub_stripes = sub_stripes; |
4836 | 4836 | ||
4837 | num_bytes = stripe_size * data_stripes; | 4837 | chunk_size = stripe_size * data_stripes; |
4838 | 4838 | ||
4839 | trace_btrfs_chunk_alloc(info, map, start, num_bytes); | 4839 | trace_btrfs_chunk_alloc(info, map, start, chunk_size); |
4840 | 4840 | ||
4841 | em = alloc_extent_map(); | 4841 | em = alloc_extent_map(); |
4842 | if (!em) { | 4842 | if (!em) { |
@@ -4847,7 +4847,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
4847 | set_bit(EXTENT_FLAG_FS_MAPPING, &em->flags); | 4847 | set_bit(EXTENT_FLAG_FS_MAPPING, &em->flags); |
4848 | em->map_lookup = map; | 4848 | em->map_lookup = map; |
4849 | em->start = start; | 4849 | em->start = start; |
4850 | em->len = num_bytes; | 4850 | em->len = chunk_size; |
4851 | em->block_start = 0; | 4851 | em->block_start = 0; |
4852 | em->block_len = em->len; | 4852 | em->block_len = em->len; |
4853 | em->orig_block_len = stripe_size; | 4853 | em->orig_block_len = stripe_size; |
@@ -4865,7 +4865,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
4865 | refcount_inc(&em->refs); | 4865 | refcount_inc(&em->refs); |
4866 | write_unlock(&em_tree->lock); | 4866 | write_unlock(&em_tree->lock); |
4867 | 4867 | ||
4868 | ret = btrfs_make_block_group(trans, 0, type, start, num_bytes); | 4868 | ret = btrfs_make_block_group(trans, 0, type, start, chunk_size); |
4869 | if (ret) | 4869 | if (ret) |
4870 | goto error_del_extent; | 4870 | goto error_del_extent; |
4871 | 4871 | ||