Lines Matching refs:new_disk_conf
1499 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts() local
1520 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1521 if (!new_disk_conf) { in drbd_adm_disk_opts()
1528 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1530 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1532 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1539 if (!expect(device, new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1540 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1542 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1544 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1545 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1547 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1557 err = disk_opts_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1568 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1570 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1585 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1590 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1595 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1599 new_disk_conf->discard_zeroes_if_aligned) in drbd_adm_disk_opts()
1619 kfree(new_disk_conf); in drbd_adm_disk_opts()
1658 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1663 file = open_backing_dev(device, new_disk_conf->backing_dev, device, in open_backing_devices()
1678 file = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1681 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1684 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1685 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1728 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1776 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1777 if (!new_disk_conf) { in drbd_adm_attach()
1781 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1783 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1784 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1791 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1792 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1794 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1800 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1808 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1816 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1821 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1822 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1841 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1843 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1846 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1851 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1857 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1881 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1924 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
1948 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
1956 if (new_disk_conf->md_flushes) in drbd_adm_attach()
1971 new_disk_conf = NULL; in drbd_adm_attach()
2131 kfree(new_disk_conf); in drbd_adm_attach()
2769 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2824 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2825 if (!new_disk_conf) { in drbd_adm_resize()
2856 if (new_disk_conf) { in drbd_adm_resize()
2859 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2860 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2861 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2864 new_disk_conf = NULL; in drbd_adm_resize()
2898 kfree(new_disk_conf); in drbd_adm_resize()