Lines Matching refs:new_disk_conf
1522 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts() local
1542 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1543 if (!new_disk_conf) { in drbd_adm_disk_opts()
1550 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1552 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1554 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1561 if (!expect(new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1562 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1564 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1566 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1567 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1569 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1582 err = drbd_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1593 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1595 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1610 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1615 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1620 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1623 if (old_disk_conf->discard_zeroes_if_aligned != new_disk_conf->discard_zeroes_if_aligned in drbd_adm_disk_opts()
1624 || old_disk_conf->disable_write_same != new_disk_conf->disable_write_same) in drbd_adm_disk_opts()
1645 kfree(new_disk_conf); in drbd_adm_disk_opts()
1684 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1689 bdev = open_backing_dev(device, new_disk_conf->backing_dev, device, true); in open_backing_devices()
1702 bdev = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1705 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1708 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1709 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1750 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1798 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1799 if (!new_disk_conf) { in drbd_adm_attach()
1803 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1805 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1806 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1813 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1814 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1816 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1822 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1830 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1838 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1843 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1844 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1863 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1865 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1868 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1873 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1879 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1904 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1947 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
1961 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
1969 if (new_disk_conf->md_flushes) in drbd_adm_attach()
1984 new_disk_conf = NULL; in drbd_adm_attach()
2141 kfree(new_disk_conf); in drbd_adm_attach()
2786 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2841 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2842 if (!new_disk_conf) { in drbd_adm_resize()
2873 if (new_disk_conf) { in drbd_adm_resize()
2876 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2877 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2878 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2882 new_disk_conf = NULL; in drbd_adm_resize()
2916 kfree(new_disk_conf); in drbd_adm_resize()