Lines Matching refs:new_disk_conf
1577 struct disk_conf *new_disk_conf, *old_disk_conf; in drbd_adm_disk_opts() local
1597 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1598 if (!new_disk_conf) { in drbd_adm_disk_opts()
1605 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1607 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1609 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1616 if (!expect(new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1617 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1619 sanitize_disk_conf(device, new_disk_conf, device->ldev); in drbd_adm_disk_opts()
1621 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1622 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1624 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1634 err = disk_opts_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1645 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1647 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1662 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1667 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1672 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1675 if (old_disk_conf->discard_zeroes_if_aligned != new_disk_conf->discard_zeroes_if_aligned in drbd_adm_disk_opts()
1676 || old_disk_conf->disable_write_same != new_disk_conf->disable_write_same) in drbd_adm_disk_opts()
1697 kfree(new_disk_conf); in drbd_adm_disk_opts()
1736 struct disk_conf *new_disk_conf, in open_backing_devices() argument
1741 bdev = open_backing_dev(device, new_disk_conf->backing_dev, device, true); in open_backing_devices()
1754 bdev = open_backing_dev(device, new_disk_conf->meta_dev, in open_backing_devices()
1757 (new_disk_conf->meta_dev_idx < 0) ? (void*)device : (void*)drbd_m_holder, in open_backing_devices()
1760 (new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_FLEX_INT && in open_backing_devices()
1761 new_disk_conf->meta_dev_idx != DRBD_MD_INDEX_INTERNAL)); in open_backing_devices()
1802 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1850 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1851 if (!new_disk_conf) { in drbd_adm_attach()
1855 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1857 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1858 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1865 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1866 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1868 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1874 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1882 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1890 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1895 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1896 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1915 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1917 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1920 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1925 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1931 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1956 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1999 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
2023 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
2031 if (new_disk_conf->md_flushes) in drbd_adm_attach()
2046 new_disk_conf = NULL; in drbd_adm_attach()
2203 kfree(new_disk_conf); in drbd_adm_attach()
2840 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2895 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2896 if (!new_disk_conf) { in drbd_adm_resize()
2927 if (new_disk_conf) { in drbd_adm_resize()
2930 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2931 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2932 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2936 new_disk_conf = NULL; in drbd_adm_resize()
2970 kfree(new_disk_conf); in drbd_adm_resize()