Lines Matching refs:new_disk_conf
1570 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts() local
1591 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1592 if (!new_disk_conf) { in drbd_adm_disk_opts()
1599 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1601 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1603 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1610 if (!expect(new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1611 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1613 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1615 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1616 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1618 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1628 err = disk_opts_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1639 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1641 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1656 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1661 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1666 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1669 if (old_disk_conf->discard_zeroes_if_aligned != new_disk_conf->discard_zeroes_if_aligned in drbd_adm_disk_opts()
1670 || old_disk_conf->disable_write_same != new_disk_conf->disable_write_same) in drbd_adm_disk_opts()
1691 kfree(new_disk_conf); in drbd_adm_disk_opts()
1730 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1735 bdev = open_backing_dev(device, new_disk_conf->backing_dev, device, true); in open_backing_devices()
1748 bdev = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1751 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1754 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1755 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1796 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1844 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1845 if (!new_disk_conf) { in drbd_adm_attach()
1849 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1851 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1852 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1859 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1860 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1862 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1868 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1876 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1884 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1889 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1890 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1909 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1911 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1914 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1919 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1925 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1949 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1992 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
2016 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
2024 if (new_disk_conf->md_flushes) in drbd_adm_attach()
2039 new_disk_conf = NULL; in drbd_adm_attach()
2196 kfree(new_disk_conf); in drbd_adm_attach()
2834 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2889 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2890 if (!new_disk_conf) { in drbd_adm_resize()
2921 if (new_disk_conf) { in drbd_adm_resize()
2924 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2925 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2926 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2930 new_disk_conf = NULL; in drbd_adm_resize()
2964 kfree(new_disk_conf); in drbd_adm_resize()