Lines Matching refs:disk_conf

453 			struct disk_conf *disk_conf =  in highest_fencing_policy()  local
454 rcu_dereference(peer_device->device->ldev->disk_conf); in highest_fencing_policy()
455 fp = max_t(enum drbd_fencing_p, fp, disk_conf->fencing); in highest_fencing_policy()
983 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_determine_dev_size()
1148 static int drbd_check_al_size(struct drbd_device *device, struct disk_conf *dc) in drbd_check_al_size()
1251 max_segments = rcu_dereference(device->ldev->disk_conf)->max_bio_bvecs; in drbd_backing_dev_max_segments()
1424 static bool write_ordering_changed(struct disk_conf *a, struct disk_conf *b) in write_ordering_changed()
1431 static void sanitize_disk_conf(struct drbd_device *device, struct disk_conf *disk_conf, in sanitize_disk_conf() argument
1436 if (disk_conf->al_extents < DRBD_AL_EXTENTS_MIN) in sanitize_disk_conf()
1437 disk_conf->al_extents = DRBD_AL_EXTENTS_MIN; in sanitize_disk_conf()
1438 if (disk_conf->al_extents > drbd_al_extents_max(nbc)) in sanitize_disk_conf()
1439 disk_conf->al_extents = drbd_al_extents_max(nbc); in sanitize_disk_conf()
1442 if (disk_conf->rs_discard_granularity) { in sanitize_disk_conf()
1443 disk_conf->rs_discard_granularity = 0; /* disable feature */ in sanitize_disk_conf()
1448 if (disk_conf->rs_discard_granularity) { in sanitize_disk_conf()
1449 int orig_value = disk_conf->rs_discard_granularity; in sanitize_disk_conf()
1454 if (discard_granularity > disk_conf->rs_discard_granularity) in sanitize_disk_conf()
1455 disk_conf->rs_discard_granularity = discard_granularity; in sanitize_disk_conf()
1457 remainder = disk_conf->rs_discard_granularity % in sanitize_disk_conf()
1459 disk_conf->rs_discard_granularity += remainder; in sanitize_disk_conf()
1461 if (disk_conf->rs_discard_granularity > discard_size) in sanitize_disk_conf()
1462 disk_conf->rs_discard_granularity = discard_size; in sanitize_disk_conf()
1464 if (disk_conf->rs_discard_granularity != orig_value) in sanitize_disk_conf()
1466 disk_conf->rs_discard_granularity); in sanitize_disk_conf()
1470 static int disk_opts_check_al_size(struct drbd_device *device, struct disk_conf *dc) in disk_opts_check_al_size()
1499 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts()
1520 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1527 old_disk_conf = device->ldev->disk_conf; in drbd_adm_disk_opts()
1570 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1658 struct disk_conf *new_disk_conf, in open_backing_devices()
1712 kfree(ldev->disk_conf); in drbd_backing_dev_free()
1728 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach()
1776 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1781 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1931 unsigned long long nsz = drbd_new_dev_size(device, nbc, nbc->disk_conf->disk_size, 0); in drbd_adm_attach()
1934 if (nsz == nbc->disk_conf->disk_size) { in drbd_adm_attach()
2066 (ns.pdsk == D_OUTDATED || rcu_dereference(device->ldev->disk_conf)->fencing == FP_DONT_CARE)) in drbd_adm_attach()
2074 if (rcu_dereference(device->ldev->disk_conf)->al_updates) in drbd_adm_attach()
2257 enum drbd_fencing_p fp = rcu_dereference(device->ldev->disk_conf)->fencing; in _check_net_options()
2769 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize()
2821 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_adm_resize()
2824 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2858 old_disk_conf = device->ldev->disk_conf; in drbd_adm_resize()
2861 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
3398 struct disk_conf *disk_conf = in drbd_adm_dump_devices() local
3399 rcu_dereference(device->ldev->disk_conf); in drbd_adm_dump_devices()
3401 err = disk_conf_to_skb(skb, disk_conf, !capable(CAP_SYS_ADMIN)); in drbd_adm_dump_devices()
3735 struct disk_conf *disk_conf; in nla_put_status_info() local
3737 disk_conf = rcu_dereference(device->ldev->disk_conf); in nla_put_status_info()
3738 err = disk_conf_to_skb(skb, disk_conf, exclude_sensitive); in nla_put_status_info()