Lines Matching full:devid

651 	u64 devid;  in btrfs_open_one_device()  local
664 devid = btrfs_stack_device_id(&disk_super->dev_item); in btrfs_open_one_device()
665 if (devid != device->devid) in btrfs_open_one_device()
712 device->devid != BTRFS_DEV_REPLACE_DEVID) { in btrfs_open_one_device()
750 u64 devid = btrfs_stack_device_id(&disk_super->dev_item); in device_list_add() local
796 .devid = devid, in device_list_add()
825 device = btrfs_alloc_device(NULL, &devid, in device_list_add()
844 "BTRFS: device label %s devid %llu transid %llu %s (%d:%d) scanned by %s (%d)\n", in device_list_add()
845 disk_super->label, devid, found_transid, path, in device_list_add()
850 "BTRFS: device fsid %pU devid %llu transid %llu %s (%d:%d) scanned by %s (%d)\n", in device_list_add()
851 disk_super->fsid, devid, found_transid, path, in device_list_add()
886 * disk with same uuid and devid.We keep the one in device_list_add()
898 * We are going to replace the device path for a given devid, in device_list_add()
910 "duplicate device %s devid %llu generation %llu scanned by %s (%d)", in device_list_add()
911 path, devid, found_transid, in device_list_add()
917 "devid %llu device path %s changed to %s scanned by %s (%d)", in device_list_add()
918 devid, btrfs_dev_name(device), in device_list_add()
980 device = btrfs_alloc_device(NULL, &orig_dev->devid, in clone_fs_devices()
1032 if (device->devid == BTRFS_DEV_REPLACE_DEVID) in __btrfs_free_extra_devids()
1091 device->devid != BTRFS_DEV_REPLACE_DEVID) { in btrfs_close_one_device()
1096 if (device->devid == BTRFS_DEV_REPLACE_DEVID) in btrfs_close_one_device()
1235 if (dev1->devid < dev2->devid) in devid_cmp()
1237 else if (dev1->devid > dev2->devid) in devid_cmp()
1657 key.objectid = device->devid; in find_free_dev_extent()
1679 if (key.objectid < device->devid) in find_free_dev_extent()
1682 if (key.objectid > device->devid) in find_free_dev_extent()
1777 key.objectid = device->devid; in btrfs_free_dev_extent()
1854 btrfs_err(fs_info, "corrupted chunk tree devid -1 matched"); in find_next_devid()
1895 key.offset = device->devid; in btrfs_add_dev_item()
1907 btrfs_set_device_id(leaf, dev_item, device->devid); in btrfs_add_dev_item()
1968 key.offset = device->devid; in btrfs_rm_dev_item()
2155 "cannot remove device %s (devid %llu) due to active swapfile", in btrfs_rm_device()
2156 btrfs_dev_name(device), device->devid); in btrfs_rm_device()
2188 "failed to remove device item for devid %llu: %d", in btrfs_rm_device()
2189 device->devid, ret); in btrfs_rm_device()
2377 * the devid, fsid, and uuid. This is meant to be used for ioctls that need to
2416 args->devid = btrfs_stack_device_id(&disk_super->dev_item); in btrfs_get_dev_args_from_path()
2441 struct btrfs_fs_info *fs_info, u64 devid, in btrfs_find_device_by_devspec() argument
2448 if (devid) { in btrfs_find_device_by_devspec()
2449 args.devid = devid; in btrfs_find_device_by_devspec()
2613 args.devid = btrfs_device_id(leaf, dev_item); in btrfs_finish_sprout()
2901 key.offset = device->devid; in btrfs_update_device()
2915 btrfs_set_device_id(leaf, dev_item, device->devid); in btrfs_update_device()
3561 cpu->devid = le64_to_cpu(disk->devid); in btrfs_disk_balance_args_to_cpu()
3580 disk->devid = cpu_to_le64(cpu->devid); in btrfs_cpu_balance_args_to_disk()
3829 if (btrfs_stripe_devid(leaf, stripe) == bargs->devid) in chunk_devid_filter()
3866 if (btrfs_stripe_devid(leaf, stripe) != bargs->devid) in chunk_drange_filter()
3959 /* devid filter */ in should_balance_chunk()
3965 /* drange filter, makes sense only with devid filter */ in should_balance_chunk()
4310 CHECK_APPEND_1ARG("devid=%llu,", bargs->devid); in describe_balance_args()
4872 key.objectid = device->devid; in btrfs_shrink_device()
4898 if (key.objectid != device->devid) { in btrfs_shrink_device()
5221 "%s: devid %llu has no free space, have=%llu want=%llu", in gather_device_info()
5222 __func__, device->devid, max_avail, in gather_device_info()
5645 btrfs_set_stack_stripe_devid(stripe, device->devid); in btrfs_chunk_alloc_add_chunk_item()
6126 u64 srcdev_devid = dev_replace->srcdev->devid; in handle_ops_on_dev_replace()
6157 if (old->dev->devid != srcdev_devid) in handle_ops_on_dev_replace()
6659 if (device->devid != args->devid) in dev_args_match_device()
6667 * Find a device specified by @devid or @uuid in the list of @fs_devices, or
6670 * If devid and uuid are both specified, the match must be exact, otherwise
6671 * only devid is used.
6699 u64 devid, u8 *dev_uuid) in add_missing_dev() argument
6712 device = btrfs_alloc_device(NULL, &devid, dev_uuid, NULL); in add_missing_dev()
6728 * Allocate new device struct, set up devid and UUID.
6730 * @fs_info: used only for generating a new devid, can be NULL if
6731 * devid is provided (i.e. @devid != NULL).
6732 * @devid: a pointer to devid for this device. If NULL a new devid
6743 const u64 *devid, const u8 *uuid, in btrfs_alloc_device() argument
6749 if (WARN_ON(!devid && !fs_info)) in btrfs_alloc_device()
6764 if (devid) in btrfs_alloc_device()
6765 tmp = *devid; in btrfs_alloc_device()
6775 dev->devid = tmp; in btrfs_alloc_device()
6797 u64 devid, u8 *uuid, bool error) in btrfs_report_missing_device() argument
6800 btrfs_err_rl(fs_info, "devid %llu uuid %pU is missing", in btrfs_report_missing_device()
6801 devid, uuid); in btrfs_report_missing_device()
6803 btrfs_warn_rl(fs_info, "devid %llu uuid %pU is missing", in btrfs_report_missing_device()
6804 devid, uuid); in btrfs_report_missing_device()
6855 u64 devid, u8 *uuid) in handle_missing_device() argument
6860 btrfs_report_missing_device(fs_info, devid, uuid, true); in handle_missing_device()
6864 dev = add_missing_dev(fs_info->fs_devices, devid, uuid); in handle_missing_device()
6867 devid, PTR_ERR(dev)); in handle_missing_device()
6870 btrfs_report_missing_device(fs_info, devid, uuid, false); in handle_missing_device()
6883 u64 devid; in read_one_chunk() local
6948 devid = btrfs_stripe_devid_nr(leaf, chunk, i); in read_one_chunk()
6949 args.devid = devid; in read_one_chunk()
6957 devid, uuid); in read_one_chunk()
6985 device->devid = btrfs_device_id(leaf, dev_item); in fill_device_from_item()
6995 WARN_ON(device->devid == BTRFS_DEV_REPLACE_DEVID); in fill_device_from_item()
7063 u64 devid; in read_one_dev() local
7068 devid = btrfs_device_id(leaf, dev_item); in read_one_dev()
7069 args.devid = devid; in read_one_dev()
7086 btrfs_report_missing_device(fs_info, devid, in read_one_dev()
7091 device = add_missing_dev(fs_devices, devid, dev_uuid); in read_one_dev()
7095 devid, PTR_ERR(device)); in read_one_dev()
7098 btrfs_report_missing_device(fs_info, devid, dev_uuid, false); in read_one_dev()
7103 devid, dev_uuid, true); in read_one_dev()
7106 btrfs_report_missing_device(fs_info, devid, in read_one_dev()
7528 key.offset = device->devid; in btrfs_device_init_dev_stats()
7603 key.offset = device->devid; in update_dev_stat_item()
7739 args.devid = stats->devid; in btrfs_get_dev_stats()
7813 u64 chunk_offset, u64 devid, in verify_one_dev_extent() argument
7816 struct btrfs_dev_lookup_args args = { .devid = devid }; in verify_one_dev_extent()
7827 "dev extent physical offset %llu on devid %llu doesn't have corresponding chunk", in verify_one_dev_extent()
7828 physical_offset, devid); in verify_one_dev_extent()
7836 "dev extent physical offset %llu on devid %llu length doesn't match chunk %llu, have %llu expect %l… in verify_one_dev_extent()
7837 physical_offset, devid, map->start, physical_len, in verify_one_dev_extent()
7850 "devid %llu physical %llu len %llu inside the reserved space", in verify_one_dev_extent()
7851 devid, physical_offset, physical_len); in verify_one_dev_extent()
7854 if (map->stripes[i].dev->devid == devid && in verify_one_dev_extent()
7870 "dev extent physical offset %llu devid %llu has no corresponding chunk", in verify_one_dev_extent()
7871 physical_offset, devid); in verify_one_dev_extent()
7878 btrfs_err(fs_info, "failed to find devid %llu", devid); in verify_one_dev_extent()
7885 "dev extent devid %llu physical offset %llu len %llu is beyond device boundary %llu", in verify_one_dev_extent()
7886 devid, physical_offset, physical_len, in verify_one_dev_extent()
7898 "zoned: dev extent devid %llu physical offset %llu len %llu is not aligned to device zone", in verify_one_dev_extent()
7899 devid, physical_offset, physical_len); in verify_one_dev_extent()
7992 u64 devid; in btrfs_verify_dev_extents() local
7997 devid = key.objectid; in btrfs_verify_dev_extents()
8005 if (devid == prev_devid && physical_offset < prev_dev_ext_end) { in btrfs_verify_dev_extents()
8007 "dev extent devid %llu physical offset %llu overlap with previous dev extent end %llu", in btrfs_verify_dev_extents()
8008 devid, physical_offset, prev_dev_ext_end); in btrfs_verify_dev_extents()
8013 ret = verify_one_dev_extent(fs_info, chunk_offset, devid, in btrfs_verify_dev_extents()
8017 prev_devid = devid; in btrfs_verify_dev_extents()