diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-03-30 12:58:47 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 13:12:11 +0200 |
commit | 29d2b84cf92780b74fd768f5506b0fc8dab56237 (patch) | |
tree | 163f177ea08b31be1b62608ce8b5917ae3bf36d8 /usr | |
parent | b04e217704b7f879c6b91222b066983a44a7a09f (diff) |
btrfs: Replace owner argument in add_pinned_bytes with a boolean
add_pinned_bytes really cares whether the bytes being pinned are either
data or metadata. To that effect it checks whether the 'owner' argument
is less than BTRFS_FIRST_FREE_OBJECTID (256). This works because
owner can really have 2 types of values:
a) For metadata extents it holds the level at which the parent is in
the btree. This amounts to owner having the values 0-7
b) In case of modifying data extents, owner is the inode number
to which those extents belongs.
Let's make this more explicit byt converting the owner parameter to a
boolean value and either pass it directly when we know the type of
extents we are working with (i.e. in btrfs_free_tree_block). In cases
when the parent function can be called on both metadata/data extents
perform the check in the caller. This hopefully makes the interface
of add_pinned_bytes more intuitive.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions