Lines Matching refs:nbc

1426 			       struct drbd_backing_dev *nbc)  in sanitize_disk_conf()  argument
1428 struct block_device *bdev = nbc->backing_bdev; in sanitize_disk_conf()
1432 if (disk_conf->al_extents > drbd_al_extents_max(nbc)) in sanitize_disk_conf()
1433 disk_conf->al_extents = drbd_al_extents_max(nbc); in sanitize_disk_conf()
1653 struct drbd_backing_dev *nbc) in open_backing_devices() argument
1660 nbc->backing_bdev = bdev; in open_backing_devices()
1680 nbc->md_bdev = bdev; in open_backing_devices()
1717 struct drbd_backing_dev *nbc = NULL; /* new_backing_conf */ in drbd_adm_attach() local
1759 nbc = kzalloc(sizeof(struct drbd_backing_dev), GFP_KERNEL); in drbd_adm_attach()
1760 if (!nbc) { in drbd_adm_attach()
1764 spin_lock_init(&nbc->md.uuid_lock); in drbd_adm_attach()
1771 nbc->disk_conf = new_disk_conf; in drbd_adm_attach()
1806 retcode = open_backing_devices(device, new_disk_conf, nbc); in drbd_adm_attach()
1810 if ((nbc->backing_bdev == nbc->md_bdev) != in drbd_adm_attach()
1827 retcode = drbd_md_read(device, nbc); in drbd_adm_attach()
1831 sanitize_disk_conf(device, new_disk_conf, nbc); in drbd_adm_attach()
1833 if (drbd_get_max_capacity(nbc) < new_disk_conf->disk_size) { in drbd_adm_attach()
1835 (unsigned long long) drbd_get_max_capacity(nbc), in drbd_adm_attach()
1850 if (drbd_get_capacity(nbc->md_bdev) < min_md_device_sectors) { in drbd_adm_attach()
1860 if (drbd_get_max_capacity(nbc) < get_capacity(device->vdisk)) { in drbd_adm_attach()
1865 nbc->known_size = drbd_get_capacity(nbc->backing_bdev); in drbd_adm_attach()
1867 if (nbc->known_size > max_possible_sectors) { in drbd_adm_attach()
1906 (device->ed_uuid & ~((u64)1)) != (nbc->md.uuid[UI_CURRENT] & ~((u64)1))) { in drbd_adm_attach()
1921 unsigned long long nsz = drbd_new_dev_size(device, nbc, nbc->disk_conf->disk_size, 0); in drbd_adm_attach()
1922 unsigned long long eff = nbc->md.la_size_sect; in drbd_adm_attach()
1923 if (drbd_md_test_flag(nbc, MDF_CONSISTENT) && nsz < eff) { in drbd_adm_attach()
1924 if (nsz == nbc->disk_conf->disk_size) { in drbd_adm_attach()
1956 device->ldev = nbc; in drbd_adm_attach()
1959 nbc = NULL; in drbd_adm_attach()
2113 if (nbc) { in drbd_adm_attach()
2114 close_backing_dev(device, nbc->md_bdev, nbc->md_bdev != nbc->backing_bdev); in drbd_adm_attach()
2115 close_backing_dev(device, nbc->backing_bdev, true); in drbd_adm_attach()
2116 kfree(nbc); in drbd_adm_attach()