fs_devices         55 fs/btrfs/block-group.c 	u64 num_devices = fs_info->fs_devices->rw_devices;
fs_devices       1995 fs/btrfs/block-group.c 	num_devices = fs_info->fs_devices->rw_devices;
fs_devices       2990 fs/btrfs/block-group.c 		num_dev = fs_info->fs_devices->rw_devices;
fs_devices        291 fs/btrfs/check-integrity.c 				      struct btrfs_fs_devices *fs_devices);
fs_devices        630 fs/btrfs/check-integrity.c 				      struct btrfs_fs_devices *fs_devices)
fs_devices        633 fs/btrfs/check-integrity.c 	struct list_head *dev_head = &fs_devices->devices;
fs_devices       1723 fs/btrfs/check-integrity.c 	if (memcmp(h->fsid, fs_info->fs_devices->fsid, BTRFS_FSID_SIZE))
fs_devices       2890 fs/btrfs/check-integrity.c 		  struct btrfs_fs_devices *fs_devices,
fs_devices       2895 fs/btrfs/check-integrity.c 	struct list_head *dev_head = &fs_devices->devices;
fs_devices       2955 fs/btrfs/check-integrity.c 	ret = btrfsic_process_superblock(state, fs_devices);
fs_devices       2958 fs/btrfs/check-integrity.c 		btrfsic_unmount(fs_devices);
fs_devices       2971 fs/btrfs/check-integrity.c void btrfsic_unmount(struct btrfs_fs_devices *fs_devices)
fs_devices       2975 fs/btrfs/check-integrity.c 	struct list_head *dev_head = &fs_devices->devices;
fs_devices         20 fs/btrfs/check-integrity.h 		  struct btrfs_fs_devices *fs_devices,
fs_devices         22 fs/btrfs/check-integrity.h void btrfsic_unmount(struct btrfs_fs_devices *fs_devices);
fs_devices        342 fs/btrfs/compression.c 	bdev = fs_info->fs_devices->latest_bdev;
fs_devices        607 fs/btrfs/compression.c 	bdev = fs_info->fs_devices->latest_bdev;
fs_devices        256 fs/btrfs/ctree.c 	write_extent_buffer_fsid(cow, fs_info->fs_devices->metadata_uuid);
fs_devices       1102 fs/btrfs/ctree.c 	write_extent_buffer_fsid(cow, fs_info->fs_devices->metadata_uuid);
fs_devices        752 fs/btrfs/ctree.h 	struct btrfs_fs_devices *fs_devices;
fs_devices        115 fs/btrfs/dev-replace.c 		dev_replace->srcdev = btrfs_find_device(fs_info->fs_devices,
fs_devices        117 fs/btrfs/dev-replace.c 		dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices,
fs_devices        158 fs/btrfs/dev-replace.c 			WARN_ON(fs_info->fs_devices->rw_devices == 0);
fs_devices        193 fs/btrfs/dev-replace.c 	if (fs_info->fs_devices->seeding) {
fs_devices        207 fs/btrfs/dev-replace.c 	devices = &fs_info->fs_devices->devices;
fs_devices        258 fs/btrfs/dev-replace.c 	device->fs_devices = fs_info->fs_devices;
fs_devices        260 fs/btrfs/dev-replace.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices        261 fs/btrfs/dev-replace.c 	list_add(&device->dev_list, &fs_info->fs_devices->devices);
fs_devices        262 fs/btrfs/dev-replace.c 	fs_info->fs_devices->num_devices++;
fs_devices        263 fs/btrfs/dev-replace.c 	fs_info->fs_devices->open_devices++;
fs_devices        264 fs/btrfs/dev-replace.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices        475 fs/btrfs/dev-replace.c 	ret = btrfs_sysfs_add_device_link(tgt_device->fs_devices, tgt_device);
fs_devices        618 fs/btrfs/dev-replace.c 		mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices        623 fs/btrfs/dev-replace.c 			mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices        653 fs/btrfs/dev-replace.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices        682 fs/btrfs/dev-replace.c 	list_add(&tgt_device->dev_alloc_list, &fs_info->fs_devices->alloc_list);
fs_devices        683 fs/btrfs/dev-replace.c 	fs_info->fs_devices->rw_devices++;
fs_devices        706 fs/btrfs/dev-replace.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices        709 fs/btrfs/dev-replace.c 	btrfs_sysfs_rm_device_link(fs_info->fs_devices, src_device);
fs_devices        216 fs/btrfs/disk-io.c 		em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices        231 fs/btrfs/disk-io.c 	em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices        536 fs/btrfs/disk-io.c 	ASSERT(memcmp_extent_buffer(eb, fs_info->fs_devices->metadata_uuid,
fs_devices        561 fs/btrfs/disk-io.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices        566 fs/btrfs/disk-io.c 	while (fs_devices) {
fs_devices        574 fs/btrfs/disk-io.c 		if (fs_devices == fs_info->fs_devices &&
fs_devices        576 fs/btrfs/disk-io.c 			metadata_uuid = fs_devices->metadata_uuid;
fs_devices        578 fs/btrfs/disk-io.c 			metadata_uuid = fs_devices->fsid;
fs_devices        584 fs/btrfs/disk-io.c 		fs_devices = fs_devices->seed;
fs_devices       1620 fs/btrfs/disk-io.c 	list_for_each_entry_rcu(device, &info->fs_devices->devices, dev_list) {
fs_devices       2138 fs/btrfs/disk-io.c 		struct btrfs_fs_devices *fs_devices)
fs_devices       2165 fs/btrfs/disk-io.c 				      min_t(u64, fs_devices->num_devices,
fs_devices       2245 fs/btrfs/disk-io.c 			    struct btrfs_fs_devices *fs_devices)
fs_devices       2253 fs/btrfs/disk-io.c 	if (fs_devices->rw_devices == 0) {
fs_devices       2460 fs/btrfs/disk-io.c 	if (memcmp(fs_info->fs_devices->metadata_uuid, sb->dev_item.fsid,
fs_devices       2464 fs/btrfs/disk-io.c 			fs_info->fs_devices->metadata_uuid, sb->dev_item.fsid);
fs_devices       2581 fs/btrfs/disk-io.c 	       struct btrfs_fs_devices *fs_devices,
fs_devices       2783 fs/btrfs/disk-io.c 	invalidate_bdev(fs_devices->latest_bdev);
fs_devices       2788 fs/btrfs/disk-io.c 	bh = btrfs_read_dev_super(fs_devices->latest_bdev);
fs_devices       2834 fs/btrfs/disk-io.c 	ASSERT(!memcmp(fs_info->fs_devices->fsid, fs_info->super_copy->fsid,
fs_devices       2838 fs/btrfs/disk-io.c 		ASSERT(!memcmp(fs_info->fs_devices->metadata_uuid,
fs_devices       2957 fs/btrfs/disk-io.c 	ret = btrfs_init_workqueues(fs_info, fs_devices);
fs_devices       2972 fs/btrfs/disk-io.c 	memcpy(&sb->s_uuid, fs_info->fs_devices->fsid, BTRFS_FSID_SIZE);
fs_devices       3014 fs/btrfs/disk-io.c 	btrfs_free_extra_devids(fs_devices, 0);
fs_devices       3016 fs/btrfs/disk-io.c 	if (!fs_devices->latest_bdev) {
fs_devices       3097 fs/btrfs/disk-io.c 	btrfs_free_extra_devids(fs_devices, 1);
fs_devices       3099 fs/btrfs/disk-io.c 	ret = btrfs_sysfs_add_fsid(fs_devices, NULL);
fs_devices       3106 fs/btrfs/disk-io.c 	ret = btrfs_sysfs_add_device(fs_devices);
fs_devices       3149 fs/btrfs/disk-io.c 	    !fs_info->fs_devices->rotating) {
fs_devices       3161 fs/btrfs/disk-io.c 		ret = btrfsic_mount(fs_info, fs_devices,
fs_devices       3183 fs/btrfs/disk-io.c 		ret = btrfs_replay_log(fs_info, fs_devices);
fs_devices       3332 fs/btrfs/disk-io.c 	btrfs_sysfs_remove_fsid(fs_info->fs_devices);
fs_devices       3363 fs/btrfs/disk-io.c 	btrfs_close_devices(fs_info->fs_devices);
fs_devices       3672 fs/btrfs/disk-io.c 	lockdep_assert_held(&info->fs_devices->device_list_mutex);
fs_devices       3674 fs/btrfs/disk-io.c 	head = &info->fs_devices->devices;
fs_devices       3774 fs/btrfs/disk-io.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3775 fs/btrfs/disk-io.c 	head = &fs_info->fs_devices->devices;
fs_devices       3782 fs/btrfs/disk-io.c 				&fs_info->fs_devices->device_list_mutex);
fs_devices       3809 fs/btrfs/disk-io.c 		memcpy(dev_item->fsid, dev->fs_devices->metadata_uuid,
fs_devices       3817 fs/btrfs/disk-io.c 			mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3830 fs/btrfs/disk-io.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3851 fs/btrfs/disk-io.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       4061 fs/btrfs/disk-io.c 	btrfs_sysfs_remove_fsid(fs_info->fs_devices);
fs_devices       4090 fs/btrfs/disk-io.c 		btrfsic_unmount(fs_info->fs_devices);
fs_devices       4094 fs/btrfs/disk-io.c 	btrfs_close_devices(fs_info->fs_devices);
fs_devices         53 fs/btrfs/disk-io.h 	       struct btrfs_fs_devices *fs_devices,
fs_devices       4458 fs/btrfs/extent-tree.c 	write_extent_buffer_fsid(buf, fs_info->fs_devices->metadata_uuid);
fs_devices       5711 fs/btrfs/extent-tree.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       5712 fs/btrfs/extent-tree.c 	devices = &fs_info->fs_devices->devices;
fs_devices       5723 fs/btrfs/extent-tree.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       2541 fs/btrfs/extent_io.c 	bio_set_dev(bio, fs_info->fs_devices->latest_bdev);
fs_devices       3856 fs/btrfs/extent_io.c 	struct block_device *bdev = fs_info->fs_devices->latest_bdev;
fs_devices        952 fs/btrfs/file-item.c 	em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices       2374 fs/btrfs/file.c 		hole_em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices       5265 fs/btrfs/inode.c 			hole_em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices       7042 fs/btrfs/inode.c 		em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices       7058 fs/btrfs/inode.c 	em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices       7695 fs/btrfs/inode.c 	em->bdev = root->fs_info->fs_devices->latest_bdev;
fs_devices       8803 fs/btrfs/inode.c 				   fs_info->fs_devices->latest_bdev,
fs_devices       10557 fs/btrfs/inode.c 		em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices        507 fs/btrfs/ioctl.c 	list_for_each_entry_rcu(device, &fs_info->fs_devices->devices,
fs_devices       1650 fs/btrfs/ioctl.c 	device = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);
fs_devices       3151 fs/btrfs/ioctl.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       3159 fs/btrfs/ioctl.c 	fi_args->num_devices = fs_devices->num_devices;
fs_devices       3161 fs/btrfs/ioctl.c 	list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) {
fs_devices       3167 fs/btrfs/ioctl.c 	memcpy(&fi_args->fsid, fs_devices->fsid, sizeof(fi_args->fsid));
fs_devices       3195 fs/btrfs/ioctl.c 	dev = btrfs_find_device(fs_info->fs_devices, di_args->devid, s_uuid,
fs_devices        773 fs/btrfs/reada.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices        781 fs/btrfs/reada.c 		mutex_lock(&fs_devices->device_list_mutex);
fs_devices        782 fs/btrfs/reada.c 		list_for_each_entry(device, &fs_devices->devices, dev_list) {
fs_devices        787 fs/btrfs/reada.c 		mutex_unlock(&fs_devices->device_list_mutex);
fs_devices        790 fs/btrfs/reada.c 	if (fs_devices->seed) {
fs_devices        791 fs/btrfs/reada.c 		fs_devices = fs_devices->seed;
fs_devices        833 fs/btrfs/reada.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices        841 fs/btrfs/reada.c 	list_for_each_entry(device, &fs_devices->devices, dev_list) {
fs_devices       3267 fs/btrfs/relocation.c 	em->bdev = fs_info->fs_devices->latest_bdev;
fs_devices       1510 fs/btrfs/scrub.c 	struct btrfs_fs_devices *fs_devices = spage->dev->fs_devices;
fs_devices       1513 fs/btrfs/scrub.c 	ret = memcmp(fsid, fs_devices->fsid, BTRFS_FSID_SIZE);
fs_devices       3723 fs/btrfs/scrub.c 	if (scrub_dev->fs_devices != fs_info->fs_devices)
fs_devices       3848 fs/btrfs/scrub.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3849 fs/btrfs/scrub.c 	dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);
fs_devices       3852 fs/btrfs/scrub.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3859 fs/btrfs/scrub.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3870 fs/btrfs/scrub.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3881 fs/btrfs/scrub.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3890 fs/btrfs/scrub.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3896 fs/btrfs/scrub.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3922 fs/btrfs/scrub.c 		mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       3924 fs/btrfs/scrub.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       4041 fs/btrfs/scrub.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       4042 fs/btrfs/scrub.c 	dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);
fs_devices       4047 fs/btrfs/scrub.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       1186 fs/btrfs/super.c 			    struct btrfs_fs_devices *fs_devices,
fs_devices       1213 fs/btrfs/super.c 	err = open_ctree(sb, fs_devices, (char *)data);
fs_devices       1384 fs/btrfs/super.c 	return fs_info->fs_devices == p->fs_devices;
fs_devices       1482 fs/btrfs/super.c 	struct btrfs_fs_devices *fs_devices = NULL;
fs_devices       1530 fs/btrfs/super.c 	fs_devices = device->fs_devices;
fs_devices       1531 fs/btrfs/super.c 	fs_info->fs_devices = fs_devices;
fs_devices       1533 fs/btrfs/super.c 	error = btrfs_open_devices(fs_devices, mode, fs_type);
fs_devices       1538 fs/btrfs/super.c 	if (!(flags & SB_RDONLY) && fs_devices->rw_devices == 0) {
fs_devices       1543 fs/btrfs/super.c 	bdev = fs_devices->latest_bdev;
fs_devices       1552 fs/btrfs/super.c 		btrfs_close_devices(fs_devices);
fs_devices       1561 fs/btrfs/super.c 		error = btrfs_fill_super(s, fs_devices, data);
fs_devices       1574 fs/btrfs/super.c 	btrfs_close_devices(fs_devices);
fs_devices       1794 fs/btrfs/super.c 		if (fs_info->fs_devices->rw_devices == 0) {
fs_devices       1904 fs/btrfs/super.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       1917 fs/btrfs/super.c 	nr_devices = fs_info->fs_devices->open_devices;
fs_devices       1920 fs/btrfs/super.c 		nr_devices = fs_info->fs_devices->open_devices;
fs_devices       1948 fs/btrfs/super.c 	list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) {
fs_devices       2033 fs/btrfs/super.c 	__be32 *fsid = (__be32 *)fs_info->fs_devices->fsid;
fs_devices       2210 fs/btrfs/super.c 		ret = !(device->fs_devices->num_devices ==
fs_devices       2211 fs/btrfs/super.c 			device->fs_devices->total_devices);
fs_devices       2269 fs/btrfs/super.c 	cur_devices = fs_info->fs_devices;
fs_devices        602 fs/btrfs/sysfs.c 			fs_info->fs_devices->metadata_uuid);
fs_devices        683 fs/btrfs/sysfs.c 				ret = sysfs_merge_group(&fs_info->fs_devices->fsid_kobj,
fs_devices        688 fs/btrfs/sysfs.c 				sysfs_unmerge_group(&fs_info->fs_devices->fsid_kobj,
fs_devices        736 fs/btrfs/sysfs.c 	sysfs_remove_group(&fs_info->fs_devices->fsid_kobj, &btrfs_feature_attr_group);
fs_devices        737 fs/btrfs/sysfs.c 	sysfs_remove_files(&fs_info->fs_devices->fsid_kobj, btrfs_attrs);
fs_devices        738 fs/btrfs/sysfs.c 	btrfs_sysfs_rm_device_link(fs_info->fs_devices, NULL);
fs_devices        927 fs/btrfs/sysfs.c int btrfs_sysfs_rm_device_link(struct btrfs_fs_devices *fs_devices,
fs_devices        933 fs/btrfs/sysfs.c 	if (!fs_devices->device_dir_kobj)
fs_devices        940 fs/btrfs/sysfs.c 		sysfs_remove_link(fs_devices->device_dir_kobj,
fs_devices        948 fs/btrfs/sysfs.c 			&fs_devices->devices, dev_list) {
fs_devices        954 fs/btrfs/sysfs.c 		sysfs_remove_link(fs_devices->device_dir_kobj,
fs_devices        973 fs/btrfs/sysfs.c int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
fs_devices        979 fs/btrfs/sysfs.c 	list_for_each_entry(dev, &fs_devices->devices, dev_list) {
fs_devices        992 fs/btrfs/sysfs.c 		error = sysfs_create_link(fs_devices->device_dir_kobj,
fs_devices       1012 fs/btrfs/sysfs.c void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices,
fs_devices       1022 fs/btrfs/sysfs.c 	if (kobject_rename(&fs_devices->fsid_kobj, fsid_buf))
fs_devices       1023 fs/btrfs/sysfs.c 		btrfs_warn(fs_devices->fs_info,
fs_devices       1054 fs/btrfs/sysfs.c 	struct btrfs_fs_devices *fs_devs = fs_info->fs_devices;
fs_devices       1121 fs/btrfs/sysfs.c 	fs_devs = fs_info->fs_devices;
fs_devices         17 fs/btrfs/sysfs.h int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
fs_devices         19 fs/btrfs/sysfs.h int btrfs_sysfs_rm_device_link(struct btrfs_fs_devices *fs_devices,
fs_devices         25 fs/btrfs/sysfs.h void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices,
fs_devices         96 fs/btrfs/tests/btrfs-tests.c 	fs_info->fs_devices = kzalloc(sizeof(struct btrfs_fs_devices),
fs_devices         98 fs/btrfs/tests/btrfs-tests.c 	if (!fs_info->fs_devices) {
fs_devices        105 fs/btrfs/tests/btrfs-tests.c 		kfree(fs_info->fs_devices);
fs_devices        114 fs/btrfs/tests/btrfs-tests.c 		kfree(fs_info->fs_devices);
fs_devices        186 fs/btrfs/tests/btrfs-tests.c 	kfree(fs_info->fs_devices);
fs_devices        348 fs/btrfs/volumes.c static void free_fs_devices(struct btrfs_fs_devices *fs_devices)
fs_devices        351 fs/btrfs/volumes.c 	WARN_ON(fs_devices->opened);
fs_devices        352 fs/btrfs/volumes.c 	while (!list_empty(&fs_devices->devices)) {
fs_devices        353 fs/btrfs/volumes.c 		device = list_entry(fs_devices->devices.next,
fs_devices        358 fs/btrfs/volumes.c 	kfree(fs_devices);
fs_devices        363 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices        366 fs/btrfs/volumes.c 		fs_devices = list_entry(fs_uuids.next,
fs_devices        368 fs/btrfs/volumes.c 		list_del(&fs_devices->fs_list);
fs_devices        369 fs/btrfs/volumes.c 		free_fs_devices(fs_devices);
fs_devices        415 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices        426 fs/btrfs/volumes.c 		list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
fs_devices        427 fs/btrfs/volumes.c 			if (fs_devices->fsid_change &&
fs_devices        428 fs/btrfs/volumes.c 			    memcmp(metadata_fsid, fs_devices->fsid,
fs_devices        430 fs/btrfs/volumes.c 			    memcmp(fs_devices->fsid, fs_devices->metadata_uuid,
fs_devices        432 fs/btrfs/volumes.c 				return fs_devices;
fs_devices        441 fs/btrfs/volumes.c 		list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
fs_devices        442 fs/btrfs/volumes.c 			if (fs_devices->fsid_change &&
fs_devices        443 fs/btrfs/volumes.c 			    memcmp(fs_devices->metadata_uuid,
fs_devices        444 fs/btrfs/volumes.c 				   fs_devices->fsid, BTRFS_FSID_SIZE) != 0 &&
fs_devices        445 fs/btrfs/volumes.c 			    memcmp(metadata_fsid, fs_devices->metadata_uuid,
fs_devices        447 fs/btrfs/volumes.c 				return fs_devices;
fs_devices        453 fs/btrfs/volumes.c 	list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
fs_devices        455 fs/btrfs/volumes.c 			if (memcmp(fsid, fs_devices->fsid, BTRFS_FSID_SIZE) == 0
fs_devices        456 fs/btrfs/volumes.c 			    && memcmp(metadata_fsid, fs_devices->metadata_uuid,
fs_devices        458 fs/btrfs/volumes.c 				return fs_devices;
fs_devices        460 fs/btrfs/volumes.c 			if (memcmp(fsid, fs_devices->fsid, BTRFS_FSID_SIZE) == 0)
fs_devices        461 fs/btrfs/volumes.c 				return fs_devices;
fs_devices        650 fs/btrfs/volumes.c 		    fs_info->fs_devices->open_devices > 1) {
fs_devices        735 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices, *tmp_fs_devices;
fs_devices        742 fs/btrfs/volumes.c 	list_for_each_entry_safe(fs_devices, tmp_fs_devices, &fs_uuids, fs_list) {
fs_devices        744 fs/btrfs/volumes.c 		mutex_lock(&fs_devices->device_list_mutex);
fs_devices        746 fs/btrfs/volumes.c 					 &fs_devices->devices, dev_list) {
fs_devices        753 fs/btrfs/volumes.c 			if (fs_devices->opened) {
fs_devices        761 fs/btrfs/volumes.c 			fs_devices->num_devices--;
fs_devices        766 fs/btrfs/volumes.c 			if (fs_devices->num_devices == 0)
fs_devices        769 fs/btrfs/volumes.c 		mutex_unlock(&fs_devices->device_list_mutex);
fs_devices        771 fs/btrfs/volumes.c 		if (fs_devices->num_devices == 0) {
fs_devices        772 fs/btrfs/volumes.c 			btrfs_sysfs_remove_fsid(fs_devices);
fs_devices        773 fs/btrfs/volumes.c 			list_del(&fs_devices->fs_list);
fs_devices        774 fs/btrfs/volumes.c 			free_fs_devices(fs_devices);
fs_devices        781 fs/btrfs/volumes.c static int btrfs_open_one_device(struct btrfs_fs_devices *fs_devices,
fs_devices        821 fs/btrfs/volumes.c 		fs_devices->seeding = 1;
fs_devices        831 fs/btrfs/volumes.c 		fs_devices->rotating = 1;
fs_devices        837 fs/btrfs/volumes.c 	fs_devices->open_devices++;
fs_devices        840 fs/btrfs/volumes.c 		fs_devices->rw_devices++;
fs_devices        841 fs/btrfs/volumes.c 		list_add_tail(&device->dev_alloc_list, &fs_devices->alloc_list);
fs_devices        861 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices        863 fs/btrfs/volumes.c 	list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
fs_devices        864 fs/btrfs/volumes.c 		if (memcmp(fs_devices->metadata_uuid, fs_devices->fsid,
fs_devices        866 fs/btrfs/volumes.c 		    memcmp(fs_devices->metadata_uuid, disk_super->fsid,
fs_devices        867 fs/btrfs/volumes.c 			   BTRFS_FSID_SIZE) == 0 && !fs_devices->fsid_change) {
fs_devices        868 fs/btrfs/volumes.c 			return fs_devices;
fs_devices        879 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices        890 fs/btrfs/volumes.c 	list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
fs_devices        892 fs/btrfs/volumes.c 		if (memcmp(fs_devices->metadata_uuid, fs_devices->fsid,
fs_devices        894 fs/btrfs/volumes.c 		    memcmp(fs_devices->metadata_uuid, disk_super->metadata_uuid,
fs_devices        896 fs/btrfs/volumes.c 		    memcmp(fs_devices->fsid, disk_super->fsid,
fs_devices        898 fs/btrfs/volumes.c 			return fs_devices;
fs_devices        901 fs/btrfs/volumes.c 		if (memcmp(fs_devices->metadata_uuid, fs_devices->fsid,
fs_devices        903 fs/btrfs/volumes.c 		    memcmp(fs_devices->fsid, disk_super->metadata_uuid,
fs_devices        905 fs/btrfs/volumes.c 			return fs_devices;
fs_devices        914 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices        925 fs/btrfs/volumes.c 	list_for_each_entry(fs_devices, &fs_uuids, fs_list) {
fs_devices        926 fs/btrfs/volumes.c 		if (memcmp(fs_devices->fsid, fs_devices->metadata_uuid,
fs_devices        928 fs/btrfs/volumes.c 		    memcmp(fs_devices->metadata_uuid, disk_super->fsid,
fs_devices        930 fs/btrfs/volumes.c 		    fs_devices->fsid_change)
fs_devices        931 fs/btrfs/volumes.c 			return fs_devices;
fs_devices        948 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = NULL;
fs_devices        965 fs/btrfs/volumes.c 			fs_devices = find_fsid_inprogress(disk_super);
fs_devices        966 fs/btrfs/volumes.c 			if (!fs_devices)
fs_devices        967 fs/btrfs/volumes.c 				fs_devices = find_fsid(disk_super->fsid, NULL);
fs_devices        969 fs/btrfs/volumes.c 			fs_devices = find_fsid_changed(disk_super);
fs_devices        972 fs/btrfs/volumes.c 		fs_devices = find_fsid(disk_super->fsid,
fs_devices        975 fs/btrfs/volumes.c 		fs_devices = find_fsid_reverted_metadata(disk_super);
fs_devices        976 fs/btrfs/volumes.c 		if (!fs_devices)
fs_devices        977 fs/btrfs/volumes.c 			fs_devices = find_fsid(disk_super->fsid, NULL);
fs_devices        981 fs/btrfs/volumes.c 	if (!fs_devices) {
fs_devices        983 fs/btrfs/volumes.c 			fs_devices = alloc_fs_devices(disk_super->fsid,
fs_devices        986 fs/btrfs/volumes.c 			fs_devices = alloc_fs_devices(disk_super->fsid, NULL);
fs_devices        988 fs/btrfs/volumes.c 		if (IS_ERR(fs_devices))
fs_devices        989 fs/btrfs/volumes.c 			return ERR_CAST(fs_devices);
fs_devices        991 fs/btrfs/volumes.c 		fs_devices->fsid_change = fsid_change_in_progress;
fs_devices        993 fs/btrfs/volumes.c 		mutex_lock(&fs_devices->device_list_mutex);
fs_devices        994 fs/btrfs/volumes.c 		list_add(&fs_devices->fs_list, &fs_uuids);
fs_devices        998 fs/btrfs/volumes.c 		mutex_lock(&fs_devices->device_list_mutex);
fs_devices        999 fs/btrfs/volumes.c 		device = btrfs_find_device(fs_devices, devid,
fs_devices       1007 fs/btrfs/volumes.c 		if (fs_devices->fsid_change &&
fs_devices       1008 fs/btrfs/volumes.c 		    found_transid > fs_devices->latest_generation) {
fs_devices       1009 fs/btrfs/volumes.c 			memcpy(fs_devices->fsid, disk_super->fsid,
fs_devices       1013 fs/btrfs/volumes.c 				memcpy(fs_devices->metadata_uuid,
fs_devices       1017 fs/btrfs/volumes.c 				memcpy(fs_devices->metadata_uuid,
fs_devices       1020 fs/btrfs/volumes.c 			fs_devices->fsid_change = false;
fs_devices       1025 fs/btrfs/volumes.c 		if (fs_devices->opened) {
fs_devices       1026 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1033 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1041 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1046 fs/btrfs/volumes.c 		list_add_rcu(&device->dev_list, &fs_devices->devices);
fs_devices       1047 fs/btrfs/volumes.c 		fs_devices->num_devices++;
fs_devices       1049 fs/btrfs/volumes.c 		device->fs_devices = fs_devices;
fs_devices       1086 fs/btrfs/volumes.c 		if (!fs_devices->opened && found_transid < device->generation) {
fs_devices       1094 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1107 fs/btrfs/volumes.c 				mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1113 fs/btrfs/volumes.c 				mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1129 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1135 fs/btrfs/volumes.c 			fs_devices->missing_devices--;
fs_devices       1146 fs/btrfs/volumes.c 	if (!fs_devices->opened) {
fs_devices       1148 fs/btrfs/volumes.c 		fs_devices->latest_generation = max_t(u64, found_transid,
fs_devices       1149 fs/btrfs/volumes.c 						fs_devices->latest_generation);
fs_devices       1152 fs/btrfs/volumes.c 	fs_devices->total_devices = btrfs_super_num_devices(disk_super);
fs_devices       1154 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1160 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices       1165 fs/btrfs/volumes.c 	fs_devices = alloc_fs_devices(orig->fsid, NULL);
fs_devices       1166 fs/btrfs/volumes.c 	if (IS_ERR(fs_devices))
fs_devices       1167 fs/btrfs/volumes.c 		return fs_devices;
fs_devices       1170 fs/btrfs/volumes.c 	fs_devices->total_devices = orig->total_devices;
fs_devices       1197 fs/btrfs/volumes.c 		list_add(&device->dev_list, &fs_devices->devices);
fs_devices       1198 fs/btrfs/volumes.c 		device->fs_devices = fs_devices;
fs_devices       1199 fs/btrfs/volumes.c 		fs_devices->num_devices++;
fs_devices       1202 fs/btrfs/volumes.c 	return fs_devices;
fs_devices       1205 fs/btrfs/volumes.c 	free_fs_devices(fs_devices);
fs_devices       1213 fs/btrfs/volumes.c void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step)
fs_devices       1221 fs/btrfs/volumes.c 	list_for_each_entry_safe(device, next, &fs_devices->devices, dev_list) {
fs_devices       1252 fs/btrfs/volumes.c 			fs_devices->open_devices--;
fs_devices       1259 fs/btrfs/volumes.c 				fs_devices->rw_devices--;
fs_devices       1262 fs/btrfs/volumes.c 		fs_devices->num_devices--;
fs_devices       1266 fs/btrfs/volumes.c 	if (fs_devices->seed) {
fs_devices       1267 fs/btrfs/volumes.c 		fs_devices = fs_devices->seed;
fs_devices       1271 fs/btrfs/volumes.c 	fs_devices->latest_bdev = latest_dev->bdev;
fs_devices       1291 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = device->fs_devices;
fs_devices       1296 fs/btrfs/volumes.c 		fs_devices->open_devices--;
fs_devices       1301 fs/btrfs/volumes.c 		fs_devices->rw_devices--;
fs_devices       1305 fs/btrfs/volumes.c 		fs_devices->missing_devices--;
fs_devices       1321 fs/btrfs/volumes.c 	new_device->fs_devices = device->fs_devices;
fs_devices       1327 fs/btrfs/volumes.c static int close_fs_devices(struct btrfs_fs_devices *fs_devices)
fs_devices       1331 fs/btrfs/volumes.c 	if (--fs_devices->opened > 0)
fs_devices       1334 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       1335 fs/btrfs/volumes.c 	list_for_each_entry_safe(device, tmp, &fs_devices->devices, dev_list) {
fs_devices       1338 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1340 fs/btrfs/volumes.c 	WARN_ON(fs_devices->open_devices);
fs_devices       1341 fs/btrfs/volumes.c 	WARN_ON(fs_devices->rw_devices);
fs_devices       1342 fs/btrfs/volumes.c 	fs_devices->opened = 0;
fs_devices       1343 fs/btrfs/volumes.c 	fs_devices->seeding = 0;
fs_devices       1348 fs/btrfs/volumes.c int btrfs_close_devices(struct btrfs_fs_devices *fs_devices)
fs_devices       1354 fs/btrfs/volumes.c 	ret = close_fs_devices(fs_devices);
fs_devices       1355 fs/btrfs/volumes.c 	if (!fs_devices->opened) {
fs_devices       1356 fs/btrfs/volumes.c 		seed_devices = fs_devices->seed;
fs_devices       1357 fs/btrfs/volumes.c 		fs_devices->seed = NULL;
fs_devices       1362 fs/btrfs/volumes.c 		fs_devices = seed_devices;
fs_devices       1363 fs/btrfs/volumes.c 		seed_devices = fs_devices->seed;
fs_devices       1364 fs/btrfs/volumes.c 		close_fs_devices(fs_devices);
fs_devices       1365 fs/btrfs/volumes.c 		free_fs_devices(fs_devices);
fs_devices       1370 fs/btrfs/volumes.c static int open_fs_devices(struct btrfs_fs_devices *fs_devices,
fs_devices       1379 fs/btrfs/volumes.c 	list_for_each_entry(device, &fs_devices->devices, dev_list) {
fs_devices       1381 fs/btrfs/volumes.c 		if (btrfs_open_one_device(fs_devices, device, flags, holder))
fs_devices       1388 fs/btrfs/volumes.c 	if (fs_devices->open_devices == 0) {
fs_devices       1392 fs/btrfs/volumes.c 	fs_devices->opened = 1;
fs_devices       1393 fs/btrfs/volumes.c 	fs_devices->latest_bdev = latest_dev->bdev;
fs_devices       1394 fs/btrfs/volumes.c 	fs_devices->total_rw_bytes = 0;
fs_devices       1413 fs/btrfs/volumes.c int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
fs_devices       1420 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       1421 fs/btrfs/volumes.c 	if (fs_devices->opened) {
fs_devices       1422 fs/btrfs/volumes.c 		fs_devices->opened++;
fs_devices       1425 fs/btrfs/volumes.c 		list_sort(NULL, &fs_devices->devices, devid_cmp);
fs_devices       1426 fs/btrfs/volumes.c 		ret = open_fs_devices(fs_devices, flags, holder);
fs_devices       1428 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       1972 fs/btrfs/volumes.c 	write_extent_buffer(leaf, trans->fs_info->fs_devices->metadata_uuid,
fs_devices       2105 fs/btrfs/volumes.c 		next_device = btrfs_find_next_active_device(fs_info->fs_devices,
fs_devices       2113 fs/btrfs/volumes.c 	if (fs_info->fs_devices->latest_bdev == device->bdev)
fs_devices       2114 fs/btrfs/volumes.c 		fs_info->fs_devices->latest_bdev = next_device->bdev;
fs_devices       2123 fs/btrfs/volumes.c 	u64 num_devices = fs_info->fs_devices->num_devices;
fs_devices       2140 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       2177 fs/btrfs/volumes.c 	    fs_info->fs_devices->rw_devices == 1) {
fs_devices       2185 fs/btrfs/volumes.c 		device->fs_devices->rw_devices--;
fs_devices       2222 fs/btrfs/volumes.c 	cur_devices = device->fs_devices;
fs_devices       2223 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       2229 fs/btrfs/volumes.c 	if (cur_devices != fs_devices)
fs_devices       2230 fs/btrfs/volumes.c 		fs_devices->total_devices--;
fs_devices       2240 fs/btrfs/volumes.c 		btrfs_sysfs_rm_device_link(fs_devices, device);
fs_devices       2245 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       2260 fs/btrfs/volumes.c 		while (fs_devices) {
fs_devices       2261 fs/btrfs/volumes.c 			if (fs_devices->seed == cur_devices) {
fs_devices       2262 fs/btrfs/volumes.c 				fs_devices->seed = cur_devices->seed;
fs_devices       2265 fs/btrfs/volumes.c 			fs_devices = fs_devices->seed;
fs_devices       2280 fs/btrfs/volumes.c 			 &fs_devices->alloc_list);
fs_devices       2281 fs/btrfs/volumes.c 		device->fs_devices->rw_devices++;
fs_devices       2289 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices       2291 fs/btrfs/volumes.c 	lockdep_assert_held(&srcdev->fs_info->fs_devices->device_list_mutex);
fs_devices       2299 fs/btrfs/volumes.c 	fs_devices = srcdev->fs_devices;
fs_devices       2303 fs/btrfs/volumes.c 	fs_devices->num_devices--;
fs_devices       2305 fs/btrfs/volumes.c 		fs_devices->missing_devices--;
fs_devices       2308 fs/btrfs/volumes.c 		fs_devices->rw_devices--;
fs_devices       2311 fs/btrfs/volumes.c 		fs_devices->open_devices--;
fs_devices       2317 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = srcdev->fs_devices;
fs_devices       2329 fs/btrfs/volumes.c 	if (!fs_devices->num_devices) {
fs_devices       2338 fs/btrfs/volumes.c 		ASSERT(fs_devices->seeding);
fs_devices       2340 fs/btrfs/volumes.c 		tmp_fs_devices = fs_info->fs_devices;
fs_devices       2342 fs/btrfs/volumes.c 			if (tmp_fs_devices->seed == fs_devices) {
fs_devices       2343 fs/btrfs/volumes.c 				tmp_fs_devices->seed = fs_devices->seed;
fs_devices       2348 fs/btrfs/volumes.c 		fs_devices->seed = NULL;
fs_devices       2349 fs/btrfs/volumes.c 		close_fs_devices(fs_devices);
fs_devices       2350 fs/btrfs/volumes.c 		free_fs_devices(fs_devices);
fs_devices       2356 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = tgtdev->fs_info->fs_devices;
fs_devices       2359 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       2361 fs/btrfs/volumes.c 	btrfs_sysfs_rm_device_link(fs_devices, tgtdev);
fs_devices       2364 fs/btrfs/volumes.c 		fs_devices->open_devices--;
fs_devices       2366 fs/btrfs/volumes.c 	fs_devices->num_devices--;
fs_devices       2372 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       2407 fs/btrfs/volumes.c 		device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
fs_devices       2410 fs/btrfs/volumes.c 		device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
fs_devices       2430 fs/btrfs/volumes.c 		device = btrfs_find_device(fs_info->fs_devices, devid, NULL,
fs_devices       2442 fs/btrfs/volumes.c 		list_for_each_entry(device, &fs_info->fs_devices->devices,
fs_devices       2459 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       2467 fs/btrfs/volumes.c 	if (!fs_devices->seeding)
fs_devices       2474 fs/btrfs/volumes.c 	old_devices = clone_fs_devices(fs_devices);
fs_devices       2482 fs/btrfs/volumes.c 	memcpy(seed_devices, fs_devices, sizeof(*seed_devices));
fs_devices       2488 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       2489 fs/btrfs/volumes.c 	list_splice_init_rcu(&fs_devices->devices, &seed_devices->devices,
fs_devices       2492 fs/btrfs/volumes.c 		device->fs_devices = seed_devices;
fs_devices       2495 fs/btrfs/volumes.c 	list_splice_init(&fs_devices->alloc_list, &seed_devices->alloc_list);
fs_devices       2498 fs/btrfs/volumes.c 	fs_devices->seeding = 0;
fs_devices       2499 fs/btrfs/volumes.c 	fs_devices->num_devices = 0;
fs_devices       2500 fs/btrfs/volumes.c 	fs_devices->open_devices = 0;
fs_devices       2501 fs/btrfs/volumes.c 	fs_devices->missing_devices = 0;
fs_devices       2502 fs/btrfs/volumes.c 	fs_devices->rotating = 0;
fs_devices       2503 fs/btrfs/volumes.c 	fs_devices->seed = seed_devices;
fs_devices       2505 fs/btrfs/volumes.c 	generate_random_uuid(fs_devices->fsid);
fs_devices       2506 fs/btrfs/volumes.c 	memcpy(fs_devices->metadata_uuid, fs_devices->fsid, BTRFS_FSID_SIZE);
fs_devices       2507 fs/btrfs/volumes.c 	memcpy(disk_super->fsid, fs_devices->fsid, BTRFS_FSID_SIZE);
fs_devices       2508 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       2573 fs/btrfs/volumes.c 		device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
fs_devices       2577 fs/btrfs/volumes.c 		if (device->fs_devices->seeding) {
fs_devices       2601 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       2608 fs/btrfs/volumes.c 	if (sb_rdonly(sb) && !fs_devices->seeding)
fs_devices       2616 fs/btrfs/volumes.c 	if (fs_devices->seeding) {
fs_devices       2624 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       2625 fs/btrfs/volumes.c 	list_for_each_entry(device, &fs_devices->devices, dev_list) {
fs_devices       2629 fs/btrfs/volumes.c 				&fs_devices->device_list_mutex);
fs_devices       2633 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       2682 fs/btrfs/volumes.c 	device->fs_devices = fs_devices;
fs_devices       2684 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       2686 fs/btrfs/volumes.c 	list_add_rcu(&device->dev_list, &fs_devices->devices);
fs_devices       2687 fs/btrfs/volumes.c 	list_add(&device->dev_alloc_list, &fs_devices->alloc_list);
fs_devices       2688 fs/btrfs/volumes.c 	fs_devices->num_devices++;
fs_devices       2689 fs/btrfs/volumes.c 	fs_devices->open_devices++;
fs_devices       2690 fs/btrfs/volumes.c 	fs_devices->rw_devices++;
fs_devices       2691 fs/btrfs/volumes.c 	fs_devices->total_devices++;
fs_devices       2692 fs/btrfs/volumes.c 	fs_devices->total_rw_bytes += device->total_bytes;
fs_devices       2697 fs/btrfs/volumes.c 		fs_devices->rotating = 1;
fs_devices       2709 fs/btrfs/volumes.c 	btrfs_sysfs_add_device_link(fs_devices, device);
fs_devices       2718 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       2743 fs/btrfs/volumes.c 		btrfs_sysfs_update_sprout_fsid(fs_devices,
fs_devices       2744 fs/btrfs/volumes.c 				fs_info->fs_devices->fsid);
fs_devices       2777 fs/btrfs/volumes.c 	btrfs_sysfs_rm_device_link(fs_devices, device);
fs_devices       2778 fs/btrfs/volumes.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       2782 fs/btrfs/volumes.c 	fs_info->fs_devices->num_devices--;
fs_devices       2783 fs/btrfs/volumes.c 	fs_info->fs_devices->open_devices--;
fs_devices       2784 fs/btrfs/volumes.c 	fs_info->fs_devices->rw_devices--;
fs_devices       2785 fs/btrfs/volumes.c 	fs_info->fs_devices->total_devices--;
fs_devices       2786 fs/btrfs/volumes.c 	fs_info->fs_devices->total_rw_bytes -= device->total_bytes;
fs_devices       2793 fs/btrfs/volumes.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       2881 fs/btrfs/volumes.c 	device->fs_devices->total_rw_bytes += diff;
fs_devices       3019 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       3041 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       3048 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       3064 fs/btrfs/volumes.c 			mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       3069 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       4118 fs/btrfs/volumes.c 	num_devices = fs_info->fs_devices->rw_devices;
fs_devices       4759 fs/btrfs/volumes.c 		device->fs_devices->total_rw_bytes -= diff;
fs_devices       4891 fs/btrfs/volumes.c 			device->fs_devices->total_rw_bytes += diff;
fs_devices       4958 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = info->fs_devices;
fs_devices       4988 fs/btrfs/volumes.c 	if (list_empty(&fs_devices->alloc_list)) {
fs_devices       5011 fs/btrfs/volumes.c 		if (fs_devices->total_rw_bytes > 50ULL * SZ_1G)
fs_devices       5027 fs/btrfs/volumes.c 	max_chunk_size = min(div_factor(fs_devices->total_rw_bytes, 1),
fs_devices       5030 fs/btrfs/volumes.c 	devices_info = kcalloc(fs_devices->rw_devices, sizeof(*devices_info),
fs_devices       5040 fs/btrfs/volumes.c 	list_for_each_entry(device, &fs_devices->alloc_list, dev_alloc_list) {
fs_devices       5082 fs/btrfs/volumes.c 		if (ndevs == fs_devices->rw_devices) {
fs_devices       5084 fs/btrfs/volumes.c 			     __func__, fs_devices->rw_devices);
fs_devices       5274 fs/btrfs/volumes.c 	mutex_lock(&fs_info->fs_devices->device_list_mutex);
fs_devices       5288 fs/btrfs/volumes.c 		mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       5302 fs/btrfs/volumes.c 	mutex_unlock(&fs_info->fs_devices->device_list_mutex);
fs_devices       6639 fs/btrfs/volumes.c struct btrfs_device *btrfs_find_device(struct btrfs_fs_devices *fs_devices,
fs_devices       6645 fs/btrfs/volumes.c 	while (fs_devices) {
fs_devices       6647 fs/btrfs/volumes.c 		    !memcmp(fs_devices->metadata_uuid, fsid, BTRFS_FSID_SIZE)) {
fs_devices       6648 fs/btrfs/volumes.c 			list_for_each_entry(device, &fs_devices->devices,
fs_devices       6657 fs/btrfs/volumes.c 			fs_devices = fs_devices->seed;
fs_devices       6664 fs/btrfs/volumes.c static struct btrfs_device *add_missing_dev(struct btrfs_fs_devices *fs_devices,
fs_devices       6673 fs/btrfs/volumes.c 	list_add(&device->dev_list, &fs_devices->devices);
fs_devices       6674 fs/btrfs/volumes.c 	device->fs_devices = fs_devices;
fs_devices       6675 fs/btrfs/volumes.c 	fs_devices->num_devices++;
fs_devices       6678 fs/btrfs/volumes.c 	fs_devices->missing_devices++;
fs_devices       6838 fs/btrfs/volumes.c 		map->stripes[i].dev = btrfs_find_device(fs_info->fs_devices,
fs_devices       6848 fs/btrfs/volumes.c 				add_missing_dev(fs_info->fs_devices, devid,
fs_devices       6903 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices;
fs_devices       6909 fs/btrfs/volumes.c 	fs_devices = fs_info->fs_devices->seed;
fs_devices       6910 fs/btrfs/volumes.c 	while (fs_devices) {
fs_devices       6911 fs/btrfs/volumes.c 		if (!memcmp(fs_devices->fsid, fsid, BTRFS_FSID_SIZE))
fs_devices       6912 fs/btrfs/volumes.c 			return fs_devices;
fs_devices       6914 fs/btrfs/volumes.c 		fs_devices = fs_devices->seed;
fs_devices       6917 fs/btrfs/volumes.c 	fs_devices = find_fsid(fsid, NULL);
fs_devices       6918 fs/btrfs/volumes.c 	if (!fs_devices) {
fs_devices       6922 fs/btrfs/volumes.c 		fs_devices = alloc_fs_devices(fsid, NULL);
fs_devices       6923 fs/btrfs/volumes.c 		if (IS_ERR(fs_devices))
fs_devices       6924 fs/btrfs/volumes.c 			return fs_devices;
fs_devices       6926 fs/btrfs/volumes.c 		fs_devices->seeding = 1;
fs_devices       6927 fs/btrfs/volumes.c 		fs_devices->opened = 1;
fs_devices       6928 fs/btrfs/volumes.c 		return fs_devices;
fs_devices       6931 fs/btrfs/volumes.c 	fs_devices = clone_fs_devices(fs_devices);
fs_devices       6932 fs/btrfs/volumes.c 	if (IS_ERR(fs_devices))
fs_devices       6933 fs/btrfs/volumes.c 		return fs_devices;
fs_devices       6935 fs/btrfs/volumes.c 	ret = open_fs_devices(fs_devices, FMODE_READ, fs_info->bdev_holder);
fs_devices       6937 fs/btrfs/volumes.c 		free_fs_devices(fs_devices);
fs_devices       6938 fs/btrfs/volumes.c 		fs_devices = ERR_PTR(ret);
fs_devices       6942 fs/btrfs/volumes.c 	if (!fs_devices->seeding) {
fs_devices       6943 fs/btrfs/volumes.c 		close_fs_devices(fs_devices);
fs_devices       6944 fs/btrfs/volumes.c 		free_fs_devices(fs_devices);
fs_devices       6945 fs/btrfs/volumes.c 		fs_devices = ERR_PTR(-EINVAL);
fs_devices       6949 fs/btrfs/volumes.c 	fs_devices->seed = fs_info->fs_devices->seed;
fs_devices       6950 fs/btrfs/volumes.c 	fs_info->fs_devices->seed = fs_devices;
fs_devices       6952 fs/btrfs/volumes.c 	return fs_devices;
fs_devices       6959 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       6972 fs/btrfs/volumes.c 	if (memcmp(fs_uuid, fs_devices->metadata_uuid, BTRFS_FSID_SIZE)) {
fs_devices       6973 fs/btrfs/volumes.c 		fs_devices = open_seed_devices(fs_info, fs_uuid);
fs_devices       6974 fs/btrfs/volumes.c 		if (IS_ERR(fs_devices))
fs_devices       6975 fs/btrfs/volumes.c 			return PTR_ERR(fs_devices);
fs_devices       6978 fs/btrfs/volumes.c 	device = btrfs_find_device(fs_info->fs_devices, devid, dev_uuid,
fs_devices       6987 fs/btrfs/volumes.c 		device = add_missing_dev(fs_devices, devid, dev_uuid);
fs_devices       7014 fs/btrfs/volumes.c 			device->fs_devices->missing_devices++;
fs_devices       7019 fs/btrfs/volumes.c 		if (device->fs_devices != fs_devices) {
fs_devices       7023 fs/btrfs/volumes.c 			list_move(&device->dev_list, &fs_devices->devices);
fs_devices       7024 fs/btrfs/volumes.c 			device->fs_devices->num_devices--;
fs_devices       7025 fs/btrfs/volumes.c 			fs_devices->num_devices++;
fs_devices       7027 fs/btrfs/volumes.c 			device->fs_devices->missing_devices--;
fs_devices       7028 fs/btrfs/volumes.c 			fs_devices->missing_devices++;
fs_devices       7030 fs/btrfs/volumes.c 			device->fs_devices = fs_devices;
fs_devices       7034 fs/btrfs/volumes.c 	if (device->fs_devices != fs_info->fs_devices) {
fs_devices       7045 fs/btrfs/volumes.c 		device->fs_devices->total_rw_bytes += device->total_bytes;
fs_devices       7306 fs/btrfs/volumes.c 	if (total_dev != fs_info->fs_devices->total_devices) {
fs_devices       7315 fs/btrfs/volumes.c 	    fs_info->fs_devices->total_rw_bytes) {
fs_devices       7319 fs/btrfs/volumes.c 			  fs_info->fs_devices->total_rw_bytes);
fs_devices       7334 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       7337 fs/btrfs/volumes.c 	while (fs_devices) {
fs_devices       7338 fs/btrfs/volumes.c 		mutex_lock(&fs_devices->device_list_mutex);
fs_devices       7339 fs/btrfs/volumes.c 		list_for_each_entry(device, &fs_devices->devices, dev_list)
fs_devices       7341 fs/btrfs/volumes.c 		mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       7343 fs/btrfs/volumes.c 		fs_devices = fs_devices->seed;
fs_devices       7374 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       7386 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       7387 fs/btrfs/volumes.c 	list_for_each_entry(device, &fs_devices->devices, dev_list) {
fs_devices       7421 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       7498 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       7503 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       7504 fs/btrfs/volumes.c 	list_for_each_entry(device, &fs_devices->devices, dev_list) {
fs_devices       7527 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       7576 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       7579 fs/btrfs/volumes.c 	mutex_lock(&fs_devices->device_list_mutex);
fs_devices       7580 fs/btrfs/volumes.c 	dev = btrfs_find_device(fs_info->fs_devices, stats->devid, NULL, NULL,
fs_devices       7582 fs/btrfs/volumes.c 	mutex_unlock(&fs_devices->device_list_mutex);
fs_devices       7673 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       7674 fs/btrfs/volumes.c 	while (fs_devices) {
fs_devices       7675 fs/btrfs/volumes.c 		fs_devices->fs_info = fs_info;
fs_devices       7676 fs/btrfs/volumes.c 		fs_devices = fs_devices->seed;
fs_devices       7682 fs/btrfs/volumes.c 	struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
fs_devices       7683 fs/btrfs/volumes.c 	while (fs_devices) {
fs_devices       7684 fs/btrfs/volumes.c 		fs_devices->fs_info = NULL;
fs_devices       7685 fs/btrfs/volumes.c 		fs_devices = fs_devices->seed;
fs_devices       7760 fs/btrfs/volumes.c 	dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL, true);
fs_devices       7769 fs/btrfs/volumes.c 		dev = btrfs_find_device(fs_info->fs_devices->seed, devid, NULL,
fs_devices         64 fs/btrfs/volumes.h 	struct btrfs_fs_devices *fs_devices;
fs_devices        439 fs/btrfs/volumes.h int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
fs_devices        444 fs/btrfs/volumes.h int btrfs_close_devices(struct btrfs_fs_devices *fs_devices);
fs_devices        445 fs/btrfs/volumes.h void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step);
fs_devices        461 fs/btrfs/volumes.h struct btrfs_device *btrfs_find_device(struct btrfs_fs_devices *fs_devices,
fs_devices        127 include/trace/events/btrfs.h 		memcpy(__entry->fsid, fs_info->fs_devices->fsid,	\