Lines Matching refs:sh
423 #define FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) \ argument
425 (sh) = (const struct btrfs_ioctl_search_header*) (args).buf; \
428 …(sh) = (const struct btrfs_ioctl_search_header*) ((uint8_t*) (sh) + sizeof(struct btrfs_ioctl_sear…
430 #define BTRFS_IOCTL_SEARCH_HEADER_BODY(sh) \ argument
431 ((void*) ((uint8_t*) sh + sizeof(struct btrfs_ioctl_search_header)))
471 const struct btrfs_ioctl_search_header *sh; in btrfs_subvol_get_info_fd() local
481 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in btrfs_subvol_get_info_fd()
486 btrfs_ioctl_search_args_set(&args, sh); in btrfs_subvol_get_info_fd()
488 if (sh->objectid != subvol_id) in btrfs_subvol_get_info_fd()
490 if (sh->type != BTRFS_ROOT_ITEM_KEY) in btrfs_subvol_get_info_fd()
494 … if (sh->len < offsetof(struct btrfs_root_item, otime) + sizeof(struct btrfs_timespec)) in btrfs_subvol_get_info_fd()
497 ri = BTRFS_IOCTL_SEARCH_HEADER_BODY(sh); in btrfs_subvol_get_info_fd()
565 const struct btrfs_ioctl_search_header *sh; in btrfs_qgroup_get_quota_fd() local
579 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in btrfs_qgroup_get_quota_fd()
582 btrfs_ioctl_search_args_set(&args, sh); in btrfs_qgroup_get_quota_fd()
584 if (sh->objectid != 0) in btrfs_qgroup_get_quota_fd()
586 if (sh->offset != qgroupid) in btrfs_qgroup_get_quota_fd()
589 if (sh->type == BTRFS_QGROUP_INFO_KEY) { in btrfs_qgroup_get_quota_fd()
590 … const struct btrfs_qgroup_info_item *qii = BTRFS_IOCTL_SEARCH_HEADER_BODY(sh); in btrfs_qgroup_get_quota_fd()
597 } else if (sh->type == BTRFS_QGROUP_LIMIT_KEY) { in btrfs_qgroup_get_quota_fd()
598 … const struct btrfs_qgroup_limit_item *qli = BTRFS_IOCTL_SEARCH_HEADER_BODY(sh); in btrfs_qgroup_get_quota_fd()
1100 const struct btrfs_ioctl_search_header *sh; in subvol_remove_children() local
1110 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in subvol_remove_children()
1114 btrfs_ioctl_search_args_set(&args, sh); in subvol_remove_children()
1116 if (sh->type != BTRFS_ROOT_BACKREF_KEY) in subvol_remove_children()
1118 if (sh->offset != subvol_id) in subvol_remove_children()
1121 ref = BTRFS_IOCTL_SEARCH_HEADER_BODY(sh); in subvol_remove_children()
1146 r = subvol_remove_children(subvol_fd, p, sh->objectid, flags); in subvol_remove_children()
1158 r = subvol_remove_children(child_fd, p, sh->objectid, flags); in subvol_remove_children()
1232 const struct btrfs_ioctl_search_header *sh; in btrfs_qgroup_copy_limits() local
1246 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in btrfs_qgroup_copy_limits()
1247 … const struct btrfs_qgroup_limit_item *qli = BTRFS_IOCTL_SEARCH_HEADER_BODY(sh); in btrfs_qgroup_copy_limits()
1252 btrfs_ioctl_search_args_set(&args, sh); in btrfs_qgroup_copy_limits()
1254 if (sh->objectid != 0) in btrfs_qgroup_copy_limits()
1256 if (sh->type != BTRFS_QGROUP_LIMIT_KEY) in btrfs_qgroup_copy_limits()
1258 if (sh->offset != old_qgroupid) in btrfs_qgroup_copy_limits()
1454 const struct btrfs_ioctl_search_header *sh; in subvol_snapshot_children() local
1464 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in subvol_snapshot_children()
1469 btrfs_ioctl_search_args_set(&args, sh); in subvol_snapshot_children()
1471 if (sh->type != BTRFS_ROOT_BACKREF_KEY) in subvol_snapshot_children()
1476 if (sh->offset != old_subvol_id) in subvol_snapshot_children()
1481 if (sh->objectid == new_subvol_id) in subvol_snapshot_children()
1484 ref = BTRFS_IOCTL_SEARCH_HEADER_BODY(sh); in subvol_snapshot_children()
1543 …r = subvol_snapshot_children(old_child_fd, new_child_fd, p, sh->objectid, flags & ~BTRFS_SNAPSHOT_… in subvol_snapshot_children()
1712 const struct btrfs_ioctl_search_header *sh; in btrfs_qgroup_find_parents() local
1726 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in btrfs_qgroup_find_parents()
1729 btrfs_ioctl_search_args_set(&args, sh); in btrfs_qgroup_find_parents()
1731 if (sh->type != BTRFS_QGROUP_RELATION_KEY) in btrfs_qgroup_find_parents()
1733 if (sh->offset < sh->objectid) in btrfs_qgroup_find_parents()
1735 if (sh->objectid != qgroupid) in btrfs_qgroup_find_parents()
1741 items[n_items++] = sh->offset; in btrfs_qgroup_find_parents()
1953 const struct btrfs_ioctl_search_header *sh; in btrfs_subvol_get_parent() local
1963 FOREACH_BTRFS_IOCTL_SEARCH_HEADER(i, sh, args) { in btrfs_subvol_get_parent()
1965 if (sh->type != BTRFS_ROOT_BACKREF_KEY) in btrfs_subvol_get_parent()
1967 if (sh->objectid != subvol_id) in btrfs_subvol_get_parent()
1970 *ret = sh->offset; in btrfs_subvol_get_parent()