Lines Matching refs:args

827 		struct btrfs_dev_lookup_args args = {
833 device = btrfs_find_device(fs_devices, &args);
2089 struct btrfs_dev_lookup_args *args,
2115 device = btrfs_find_device(fs_info->fs_devices, args);
2117 if (args->missing)
2344 * Populate args from device at path.
2347 * @args: the args to populate
2350 * This will read the super block of the device at @path and populate @args with
2362 struct btrfs_dev_lookup_args *args,
2372 args->missing = true;
2376 args->uuid = kzalloc(BTRFS_UUID_SIZE, GFP_KERNEL);
2377 args->fsid = kzalloc(BTRFS_FSID_SIZE, GFP_KERNEL);
2378 if (!args->uuid || !args->fsid) {
2379 btrfs_put_dev_args_from_path(args);
2386 btrfs_put_dev_args_from_path(args);
2390 args->devid = btrfs_stack_device_id(&disk_super->dev_item);
2391 memcpy(args->uuid, disk_super->dev_item.uuid, BTRFS_UUID_SIZE);
2393 memcpy(args->fsid, disk_super->metadata_uuid, BTRFS_FSID_SIZE);
2395 memcpy(args->fsid, disk_super->fsid, BTRFS_FSID_SIZE);
2406 void btrfs_put_dev_args_from_path(struct btrfs_dev_lookup_args *args)
2408 kfree(args->uuid);
2409 kfree(args->fsid);
2410 args->uuid = NULL;
2411 args->fsid = NULL;
2418 BTRFS_DEV_LOOKUP_ARGS(args);
2423 args.devid = devid;
2424 device = btrfs_find_device(fs_info->fs_devices, &args);
2430 ret = btrfs_get_dev_args_from_path(fs_info, &args, device_path);
2433 device = btrfs_find_device(fs_info->fs_devices, &args);
2434 btrfs_put_dev_args_from_path(&args);
2539 BTRFS_DEV_LOOKUP_ARGS(args);
2587 args.devid = btrfs_device_id(leaf, dev_item);
2592 args.uuid = dev_uuid;
2593 args.fsid = fs_uuid;
2594 device = btrfs_find_device(fs_info->fs_devices, &args);
6503 static bool dev_args_match_fs_devices(const struct btrfs_dev_lookup_args *args,
6506 if (args->fsid == NULL)
6508 if (memcmp(fs_devices->metadata_uuid, args->fsid, BTRFS_FSID_SIZE) == 0)
6513 static bool dev_args_match_device(const struct btrfs_dev_lookup_args *args,
6516 if (args->missing) {
6523 if (device->devid != args->devid)
6525 if (args->uuid && memcmp(device->uuid, args->uuid, BTRFS_UUID_SIZE) != 0)
6538 const struct btrfs_dev_lookup_args *args)
6543 if (dev_args_match_fs_devices(args, fs_devices)) {
6545 if (dev_args_match_device(args, device))
6551 if (!dev_args_match_fs_devices(args, seed_devs))
6554 if (dev_args_match_device(args, device))
6743 BTRFS_DEV_LOOKUP_ARGS(args);
6829 args.devid = devid;
6833 args.uuid = uuid;
6834 map->stripes[i].dev = btrfs_find_device(fs_info->fs_devices, &args);
6942 BTRFS_DEV_LOOKUP_ARGS(args);
6952 args.devid = devid;
6957 args.uuid = dev_uuid;
6958 args.fsid = fs_uuid;
6966 device = btrfs_find_device(fs_info->fs_devices, &args);
7624 BTRFS_DEV_LOOKUP_ARGS(args);
7630 args.devid = stats->devid;
7631 dev = btrfs_find_device(fs_info->fs_devices, &args);
7707 struct btrfs_dev_lookup_args args = { .devid = devid };
7773 dev = btrfs_find_device(fs_info->fs_devices, &args);