Message ID | 20250318155648.159250-1-maharmstone@fb.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: fix typo in space info explanation | expand |
On 18.03.25 16:57, Mark Harmstone wrote: > There's an explanation of how space info works at the top of > fs/btrfs/space-info.c, which makes reference to a variable called > bytes_may_reserve. There's nothing called that in the code, and wasn't > at time the comment was written; as far I can tell this is a typo, and > it should actually be bytes_may_use. > > Signed-off-by: Mark Harmstone <maharmstone@fb.com> Looks good, Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On Tue, Mar 18, 2025 at 03:56:42PM +0000, Mark Harmstone wrote: > There's an explanation of how space info works at the top of > fs/btrfs/space-info.c, which makes reference to a variable called > bytes_may_reserve. There's nothing called that in the code, and wasn't > at time the comment was written; as far I can tell this is a typo, and > it should actually be bytes_may_use. > > Signed-off-by: Mark Harmstone <maharmstone@fb.com> Added to for-next, thanks.
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index ff089e3e4103..77cc5d4a5a47 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -50,11 +50,11 @@ * num_bytes we want to reserve. * * ->reserve - * space_info->bytes_may_reserve += num_bytes + * space_info->bytes_may_use += num_bytes * * ->extent allocation * Call btrfs_add_reserved_bytes() which does - * space_info->bytes_may_reserve -= num_bytes + * space_info->bytes_may_use -= num_bytes * space_info->bytes_reserved += extent_bytes * * ->insert reference
There's an explanation of how space info works at the top of fs/btrfs/space-info.c, which makes reference to a variable called bytes_may_reserve. There's nothing called that in the code, and wasn't at time the comment was written; as far I can tell this is a typo, and it should actually be bytes_may_use. Signed-off-by: Mark Harmstone <maharmstone@fb.com> --- fs/btrfs/space-info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)