Lines Matching refs:new_disk_conf
1568 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts() local
1589 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1590 if (!new_disk_conf) { in drbd_adm_disk_opts()
1597 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1599 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1601 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1608 if (!expect(new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1609 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1611 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1613 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1614 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1616 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1626 err = disk_opts_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1637 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1639 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1654 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1659 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1664 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1667 if (old_disk_conf->discard_zeroes_if_aligned != new_disk_conf->discard_zeroes_if_aligned in drbd_adm_disk_opts()
1668 || old_disk_conf->disable_write_same != new_disk_conf->disable_write_same) in drbd_adm_disk_opts()
1689 kfree(new_disk_conf); in drbd_adm_disk_opts()
1728 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1733 bdev = open_backing_dev(device, new_disk_conf->backing_dev, device, true); in open_backing_devices()
1746 bdev = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1749 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1752 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1753 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1794 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1842 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1843 if (!new_disk_conf) { in drbd_adm_attach()
1847 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1849 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1850 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1857 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1858 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1860 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1866 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1874 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1882 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1887 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1888 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1907 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1909 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1912 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1917 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1923 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1947 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1990 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
2014 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
2022 if (new_disk_conf->md_flushes) in drbd_adm_attach()
2037 new_disk_conf = NULL; in drbd_adm_attach()
2194 kfree(new_disk_conf); in drbd_adm_attach()
2831 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2886 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2887 if (!new_disk_conf) { in drbd_adm_resize()
2918 if (new_disk_conf) { in drbd_adm_resize()
2921 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2922 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2923 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2927 new_disk_conf = NULL; in drbd_adm_resize()
2961 kfree(new_disk_conf); in drbd_adm_resize()