mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: drop the _nr from the item helpers
Now that all call sites are using the slot number to modify item values, rename the SETGET helpers to raw_item_*(), and then rework the _nr() helpers to be the btrfs_item_*() btrfs_set_item_*() helpers, and then rename all of the callers to the new helpers. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
7479420736
commit
3212fa14e7
24 changed files with 189 additions and 216 deletions
|
@ -128,7 +128,7 @@ no_valid_dev_replace_entry_found:
|
|||
}
|
||||
slot = path->slots[0];
|
||||
eb = path->nodes[0];
|
||||
item_size = btrfs_item_size_nr(eb, slot);
|
||||
item_size = btrfs_item_size(eb, slot);
|
||||
ptr = btrfs_item_ptr(eb, slot, struct btrfs_dev_replace_item);
|
||||
|
||||
if (item_size != sizeof(struct btrfs_dev_replace_item)) {
|
||||
|
@ -381,7 +381,7 @@ int btrfs_run_dev_replace(struct btrfs_trans_handle *trans)
|
|||
}
|
||||
|
||||
if (ret == 0 &&
|
||||
btrfs_item_size_nr(path->nodes[0], path->slots[0]) < sizeof(*ptr)) {
|
||||
btrfs_item_size(path->nodes[0], path->slots[0]) < sizeof(*ptr)) {
|
||||
/*
|
||||
* need to delete old one and insert a new one.
|
||||
* Since no attempt is made to recover any old state, if the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue