Lines Matching refs:new_disk_conf

1493 	struct disk_conf *new_disk_conf, *old_disk_conf;  in drbd_adm_disk_opts()  local
1514 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1515 if (!new_disk_conf) { in drbd_adm_disk_opts()
1522 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1524 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1526 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1533 if (!expect(new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1534 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1536 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1538 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1539 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1541 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1551 err = disk_opts_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1562 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1564 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1579 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1584 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1589 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1593 new_disk_conf->discard_zeroes_if_aligned) in drbd_adm_disk_opts()
1613 kfree(new_disk_conf); in drbd_adm_disk_opts()
1652 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1657 bdev = open_backing_dev(device, new_disk_conf->backing_dev, device, true); in open_backing_devices()
1670 bdev = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1673 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1676 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1677 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1718 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1766 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1767 if (!new_disk_conf) { in drbd_adm_attach()
1771 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1773 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1774 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1781 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1782 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1784 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1790 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1798 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1806 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1811 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1812 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1831 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1833 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1836 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1841 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1847 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1871 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1914 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
1938 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
1946 if (new_disk_conf->md_flushes) in drbd_adm_attach()
1961 new_disk_conf = NULL; in drbd_adm_attach()
2118 kfree(new_disk_conf); in drbd_adm_attach()
2756 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2811 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2812 if (!new_disk_conf) { in drbd_adm_resize()
2843 if (new_disk_conf) { in drbd_adm_resize()
2846 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2847 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2848 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2851 new_disk_conf = NULL; in drbd_adm_resize()
2885 kfree(new_disk_conf); in drbd_adm_resize()