Lines Matching defs:device

1344  * @anon_dev:	anonymous device to attach to the root, if zero, allocate new
1380 * Don't assign anonymous block device to roots that are not exposed to
1536 * @anon_dev: preallocated anonymous block device number for new roots,
1617 * If our caller provided us an anonymous device, then it's his
1643 * the anonymous block device id
1646 * @anon_dev: if zero, allocate a new anonymous block device or use the
3197 * Keep the devid that is marked to be the target device for the
3198 * device replace procedure
3416 btrfs_warn(fs_info, "failed to resume device replace: %d", ret);
3500 struct btrfs_device *device = bio->bi_private;
3509 btrfs_warn_rl_in_rcu(device->fs_info,
3511 rcu_str_deref(device->name),
3515 btrfs_dev_stat_inc_and_print(device,
3588 * Write superblock @sb to the @device. Do not wait for completion, all the
3592 * the expected device size at commit time. Note that max_mirrors must be
3597 static int write_dev_supers(struct btrfs_device *device,
3600 struct btrfs_fs_info *fs_info = device->fs_info;
3601 struct address_space *mapping = device->bdev->bd_inode->i_mapping;
3619 device->commit_total_bytes)
3631 btrfs_err(device->fs_info,
3650 bio_set_dev(bio, device->bdev);
3652 bio->bi_private = device;
3663 if (i == 0 && !btrfs_test_opt(device->fs_info, NOBARRIER))
3678 static int wait_dev_supers(struct btrfs_device *device, int max_mirrors)
3693 device->commit_total_bytes)
3696 page = find_get_page(device->bdev->bd_inode->i_mapping,
3721 btrfs_err(device->fs_info, "error writing primary super block to device %llu",
3722 device->devid);
3739 * Submit a flush request to the device if it supports it. Error handling is
3742 static void write_dev_flush(struct btrfs_device *device)
3744 struct bio *bio = device->flush_bio;
3757 struct request_queue *q = bdev_get_queue(device->bdev);
3764 bio_set_dev(bio, device->bdev);
3766 init_completion(&device->flush_wait);
3767 bio->bi_private = &device->flush_wait;
3770 set_bit(BTRFS_DEV_STATE_FLUSH_SENT, &device->dev_state);
3776 static blk_status_t wait_dev_flush(struct btrfs_device *device)
3778 struct bio *bio = device->flush_bio;
3780 if (!test_bit(BTRFS_DEV_STATE_FLUSH_SENT, &device->dev_state))
3783 clear_bit(BTRFS_DEV_STATE_FLUSH_SENT, &device->dev_state);
3784 wait_for_completion_io(&device->flush_wait);
3797 * send an empty flush down to each device in parallel,
3919 "errors while submitting device barriers.");