Lines Matching refs:new_disk_conf
1507 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts() local
1528 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1529 if (!new_disk_conf) { in drbd_adm_disk_opts()
1536 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1538 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1540 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1547 if (!expect(device, new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1548 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1550 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1552 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1553 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1555 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1565 err = disk_opts_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1576 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1578 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1593 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1598 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1603 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1607 new_disk_conf->discard_zeroes_if_aligned) in drbd_adm_disk_opts()
1627 kfree(new_disk_conf); in drbd_adm_disk_opts()
1666 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1671 bdev = open_backing_dev(device, new_disk_conf->backing_dev, device, true); in open_backing_devices()
1684 bdev = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1687 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1690 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1691 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1735 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1783 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1784 if (!new_disk_conf) { in drbd_adm_attach()
1788 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1790 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1791 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1798 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1799 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1801 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1807 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1815 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1823 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1828 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1829 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1848 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1850 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1853 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1858 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1864 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1888 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1931 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
1955 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
1963 if (new_disk_conf->md_flushes) in drbd_adm_attach()
1978 new_disk_conf = NULL; in drbd_adm_attach()
2140 kfree(new_disk_conf); in drbd_adm_attach()
2778 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2833 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2834 if (!new_disk_conf) { in drbd_adm_resize()
2865 if (new_disk_conf) { in drbd_adm_resize()
2868 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2869 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2870 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2873 new_disk_conf = NULL; in drbd_adm_resize()
2907 kfree(new_disk_conf); in drbd_adm_resize()