Lines Matching defs:disk_conf

453 			struct disk_conf *disk_conf =
454 rcu_dereference(peer_device->device->ldev->disk_conf);
455 fp = max_t(enum drbd_fencing_p, fp, disk_conf->fencing);
982 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size;
1147 static int drbd_check_al_size(struct drbd_device *device, struct disk_conf *dc)
1340 struct disk_conf *dc;
1349 dc = rcu_dereference(device->ldev->disk_conf);
1498 static bool write_ordering_changed(struct disk_conf *a, struct disk_conf *b)
1505 static void sanitize_disk_conf(struct drbd_device *device, struct disk_conf *disk_conf,
1510 if (disk_conf->al_extents < DRBD_AL_EXTENTS_MIN)
1511 disk_conf->al_extents = DRBD_AL_EXTENTS_MIN;
1512 if (disk_conf->al_extents > drbd_al_extents_max(nbc))
1513 disk_conf->al_extents = drbd_al_extents_max(nbc);
1516 if (disk_conf->rs_discard_granularity) {
1517 disk_conf->rs_discard_granularity = 0; /* disable feature */
1522 if (disk_conf->rs_discard_granularity) {
1523 int orig_value = disk_conf->rs_discard_granularity;
1526 if (q->limits.discard_granularity > disk_conf->rs_discard_granularity)
1527 disk_conf->rs_discard_granularity = q->limits.discard_granularity;
1529 remainder = disk_conf->rs_discard_granularity % q->limits.discard_granularity;
1530 disk_conf->rs_discard_granularity += remainder;
1532 if (disk_conf->rs_discard_granularity > q->limits.max_discard_sectors << 9)
1533 disk_conf->rs_discard_granularity = q->limits.max_discard_sectors << 9;
1535 if (disk_conf->rs_discard_granularity != orig_value)
1537 disk_conf->rs_discard_granularity);
1541 static int disk_opts_check_al_size(struct drbd_device *device, struct disk_conf *dc)
1570 struct disk_conf *new_disk_conf, *old_disk_conf;
1591 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL);
1598 old_disk_conf = device->ldev->disk_conf;
1641 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf);
1730 struct disk_conf *new_disk_conf,
1780 kfree(ldev->disk_conf);
1796 struct disk_conf *new_disk_conf = NULL;
1844 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL);
1849 nbc->disk_conf = new_disk_conf;
1999 unsigned long long nsz = drbd_new_dev_size(device, nbc, nbc->disk_conf->disk_size, 0);
2002 if (nsz == nbc->disk_conf->disk_size) {
2132 (ns.pdsk == D_OUTDATED || rcu_dereference(device->ldev->disk_conf)->fencing == FP_DONT_CARE))
2140 if (rcu_dereference(device->ldev->disk_conf)->al_updates)
2322 enum drbd_fencing_p fp = rcu_dereference(device->ldev->disk_conf)->fencing;
2834 struct disk_conf *old_disk_conf, *new_disk_conf = NULL;
2886 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size;
2889 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL);
2923 old_disk_conf = device->ldev->disk_conf;
2926 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf);
3463 struct disk_conf *disk_conf =
3464 rcu_dereference(device->ldev->disk_conf);
3466 err = disk_conf_to_skb(skb, disk_conf, !capable(CAP_SYS_ADMIN));
3800 struct disk_conf *disk_conf;
3802 disk_conf = rcu_dereference(device->ldev->disk_conf);
3803 err = disk_conf_to_skb(skb, disk_conf, exclude_sensitive);