Lines Matching refs:new_disk_conf

1319 	struct disk_conf *new_disk_conf, *old_disk_conf;  in drbd_adm_disk_opts()  local
1339 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_disk_opts()
1340 if (!new_disk_conf) { in drbd_adm_disk_opts()
1347 *new_disk_conf = *old_disk_conf; in drbd_adm_disk_opts()
1349 set_disk_conf_defaults(new_disk_conf); in drbd_adm_disk_opts()
1351 err = disk_conf_from_attrs_for_change(new_disk_conf, info); in drbd_adm_disk_opts()
1358 if (!expect(new_disk_conf->resync_rate >= 1)) in drbd_adm_disk_opts()
1359 new_disk_conf->resync_rate = 1; in drbd_adm_disk_opts()
1361 if (new_disk_conf->al_extents < DRBD_AL_EXTENTS_MIN) in drbd_adm_disk_opts()
1362 new_disk_conf->al_extents = DRBD_AL_EXTENTS_MIN; in drbd_adm_disk_opts()
1363 if (new_disk_conf->al_extents > drbd_al_extents_max(device->ldev)) in drbd_adm_disk_opts()
1364 new_disk_conf->al_extents = drbd_al_extents_max(device->ldev); in drbd_adm_disk_opts()
1366 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_disk_opts()
1367 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_disk_opts()
1369 fifo_size = (new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ; in drbd_adm_disk_opts()
1382 err = drbd_check_al_size(device, new_disk_conf); in drbd_adm_disk_opts()
1393 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_disk_opts()
1395 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1410 if (new_disk_conf->al_updates) in drbd_adm_disk_opts()
1415 if (new_disk_conf->md_flushes) in drbd_adm_disk_opts()
1420 if (write_ordering_changed(old_disk_conf, new_disk_conf)) in drbd_adm_disk_opts()
1441 kfree(new_disk_conf); in drbd_adm_disk_opts()
1464 struct disk_conf *new_disk_conf = NULL; in drbd_adm_attach() local
1513 new_disk_conf = kzalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_attach()
1514 if (!new_disk_conf) { in drbd_adm_attach()
1518 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1520 set_disk_conf_defaults(new_disk_conf); in drbd_adm_attach()
1521 err = disk_conf_from_attrs(new_disk_conf, info); in drbd_adm_attach()
1528 if (new_disk_conf->c_plan_ahead > DRBD_C_PLAN_AHEAD_MAX) in drbd_adm_attach()
1529 new_disk_conf->c_plan_ahead = DRBD_C_PLAN_AHEAD_MAX; in drbd_adm_attach()
1531 new_plan = fifo_alloc((new_disk_conf->c_plan_ahead * 10 * SLEEP_TIME) / HZ); in drbd_adm_attach()
1537 if (new_disk_conf->meta_dev_idx < DRBD_MD_INDEX_FLEX_INT) { in drbd_adm_attach()
1543 retcode = drbd_resync_after_valid(device, new_disk_conf->resync_after); in drbd_adm_attach()
1551 if (new_disk_conf->fencing == FP_STONITH && nc->wire_protocol == DRBD_PROT_A) { in drbd_adm_attach()
1559 bdev = blkdev_get_by_path(new_disk_conf->backing_dev, in drbd_adm_attach()
1562 drbd_err(device, "open(\"%s\") failed with %ld\n", new_disk_conf->backing_dev, in drbd_adm_attach()
1577 bdev = blkdev_get_by_path(new_disk_conf->meta_dev, in drbd_adm_attach()
1579 (new_disk_conf->meta_dev_idx < 0) ? in drbd_adm_attach()
1582 drbd_err(device, "open(\"%s\") failed with %ld\n", new_disk_conf->meta_dev, in drbd_adm_attach()
1590 (new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_INTERNAL || in drbd_adm_attach()
1591 new_disk_conf->meta_dev_idx == DRBD_MD_INDEX_FLEX_INT)) { in drbd_adm_attach()
1610 if (new_disk_conf->al_extents < DRBD_AL_EXTENTS_MIN) in drbd_adm_attach()
1611 new_disk_conf->al_extents = DRBD_AL_EXTENTS_MIN; in drbd_adm_attach()
1612 if (new_disk_conf->al_extents > drbd_al_extents_max(nbc)) in drbd_adm_attach()
1613 new_disk_conf->al_extents = drbd_al_extents_max(nbc); in drbd_adm_attach()
1615 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1618 (unsigned long long) new_disk_conf->disk_size); in drbd_adm_attach()
1623 if (new_disk_conf->meta_dev_idx < 0) { in drbd_adm_attach()
1629 min_md_device_sectors = MD_128MB_SECT * (new_disk_conf->meta_dev_idx + 1); in drbd_adm_attach()
1654 if (new_disk_conf->meta_dev_idx >= 0) in drbd_adm_attach()
1697 if (drbd_check_al_size(device, new_disk_conf)) { in drbd_adm_attach()
1712 if (new_disk_conf->md_flushes) in drbd_adm_attach()
1727 new_disk_conf = NULL; in drbd_adm_attach()
1886 kfree(new_disk_conf); in drbd_adm_attach()
2492 struct disk_conf *old_disk_conf, *new_disk_conf = NULL; in drbd_adm_resize() local
2547 new_disk_conf = kmalloc(sizeof(struct disk_conf), GFP_KERNEL); in drbd_adm_resize()
2548 if (!new_disk_conf) { in drbd_adm_resize()
2579 if (new_disk_conf) { in drbd_adm_resize()
2582 *new_disk_conf = *old_disk_conf; in drbd_adm_resize()
2583 new_disk_conf->disk_size = (sector_t)rs.resize_size; in drbd_adm_resize()
2584 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()