Lines Matching refs:disk_conf

454 			struct disk_conf *disk_conf =  in highest_fencing_policy()  local
455 rcu_dereference(peer_device->device->ldev->disk_conf); in highest_fencing_policy()
456 fp = max_t(enum drbd_fencing_p, fp, disk_conf->fencing); in highest_fencing_policy()
981 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_determine_dev_size()
1146 static int drbd_check_al_size(struct drbd_device *device, struct disk_conf *dc) in drbd_check_al_size()
1339 struct disk_conf *dc; in drbd_setup_queue_param()
1348 dc = rcu_dereference(device->ldev->disk_conf); in drbd_setup_queue_param()
1505 static bool write_ordering_changed(struct disk_conf *a, struct disk_conf *b) in write_ordering_changed()
1512 static void sanitize_disk_conf(struct drbd_device *device, struct disk_conf *disk_conf, in sanitize_disk_conf() argument
1517 if (disk_conf->al_extents < DRBD_AL_EXTENTS_MIN) in sanitize_disk_conf()
1518 disk_conf->al_extents = DRBD_AL_EXTENTS_MIN; in sanitize_disk_conf()
1519 if (disk_conf->al_extents > drbd_al_extents_max(nbc)) in sanitize_disk_conf()
1520 disk_conf->al_extents = drbd_al_extents_max(nbc); in sanitize_disk_conf()
1523 if (disk_conf->rs_discard_granularity) { in sanitize_disk_conf()
1524 disk_conf->rs_discard_granularity = 0; /* disable feature */ in sanitize_disk_conf()
1529 if (disk_conf->rs_discard_granularity) { in sanitize_disk_conf()
1530 int orig_value = disk_conf->rs_discard_granularity; in sanitize_disk_conf()
1533 if (q->limits.discard_granularity > disk_conf->rs_discard_granularity) in sanitize_disk_conf()
1534 disk_conf->rs_discard_granularity = q->limits.discard_granularity; in sanitize_disk_conf()
1536 remainder = disk_conf->rs_discard_granularity % q->limits.discard_granularity; in sanitize_disk_conf()
1537 disk_conf->rs_discard_granularity += remainder; in sanitize_disk_conf()
1539 if (disk_conf->rs_discard_granularity > q->limits.max_discard_sectors << 9) in sanitize_disk_conf()
1540 disk_conf->rs_discard_granularity = q->limits.max_discard_sectors << 9; in sanitize_disk_conf()
1542 if (disk_conf->rs_discard_granularity != orig_value) in sanitize_disk_conf()
1544 disk_conf->rs_discard_granularity); in sanitize_disk_conf()
1548 static int disk_opts_check_al_size(struct drbd_device *device, struct disk_conf *dc) in disk_opts_check_al_size()
1577 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts()
1597 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1604 old_disk_conf = device->ldev->disk_conf; in drbd_adm_disk_opts()
1647 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1736 struct disk_conf *new_disk_conf, in open_backing_devices()
1786 kfree(ldev->disk_conf); in drbd_backing_dev_free()
1802 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach()
1850 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1855 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
2006 unsigned long long nsz = drbd_new_dev_size(device, nbc, nbc->disk_conf->disk_size, 0); in drbd_adm_attach()
2009 if (nsz == nbc->disk_conf->disk_size) { in drbd_adm_attach()
2139 (ns.pdsk == D_OUTDATED || rcu_dereference(device->ldev->disk_conf)->fencing == FP_DONT_CARE)) in drbd_adm_attach()
2147 if (rcu_dereference(device->ldev->disk_conf)->al_updates) in drbd_adm_attach()
2329 enum drbd_fencing_p fp = rcu_dereference(device->ldev->disk_conf)->fencing; in _check_net_options()
2840 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize()
2892 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_adm_resize()
2895 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2929 old_disk_conf = device->ldev->disk_conf; in drbd_adm_resize()
2932 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
3475 struct disk_conf *disk_conf = in drbd_adm_dump_devices() local
3476 rcu_dereference(device->ldev->disk_conf); in drbd_adm_dump_devices()
3478 err = disk_conf_to_skb(skb, disk_conf, !capable(CAP_SYS_ADMIN)); in drbd_adm_dump_devices()
3812 struct disk_conf *disk_conf; in nla_put_status_info() local
3814 disk_conf = rcu_dereference(device->ldev->disk_conf); in nla_put_status_info()
3815 err = disk_conf_to_skb(skb, disk_conf, exclude_sensitive); in nla_put_status_info()