Lines Matching refs:ldev
420 rcu_dereference(peer_device->device->ldev->disk_conf); in highest_fencing_policy()
667 device->ldev->md.uuid[UI_CURRENT] &= ~(u64)1; in drbd_set_role()
680 && device->ldev->md.uuid[UI_BITMAP] == 0) || forced) in drbd_set_role()
683 device->ldev->md.uuid[UI_CURRENT] |= (u64)1; in drbd_set_role()
876 struct drbd_md *md = &device->ldev->md; in drbd_determine_dev_size()
905 prev_first_sect = drbd_md_first_sector(device->ldev); in drbd_determine_dev_size()
906 prev_size = device->ldev->md.md_size_sect; in drbd_determine_dev_size()
907 la_size_sect = device->ldev->md.la_size_sect; in drbd_determine_dev_size()
920 drbd_md_set_sector_offsets(device, device->ldev); in drbd_determine_dev_size()
923 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_determine_dev_size()
925 size = drbd_new_dev_size(device, device->ldev, u_size, flags & DDSF_FORCED); in drbd_determine_dev_size()
961 device->ldev->md.la_size_sect = size; in drbd_determine_dev_size()
968 la_size_changed = (la_size_sect != device->ldev->md.la_size_sect); in drbd_determine_dev_size()
970 md_moved = prev_first_sect != drbd_md_first_sector(device->ldev) in drbd_determine_dev_size()
971 || prev_size != device->ldev->md.md_size_sect; in drbd_determine_dev_size()
1014 drbd_md_set_sector_offsets(device, device->ldev); in drbd_determine_dev_size()
1138 max_segments = rcu_dereference(device->ldev->disk_conf)->max_bio_bvecs; in drbd_setup_queue_param()
1346 old_disk_conf = device->ldev->disk_conf; 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()
1395 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_disk_opts()
1411 device->ldev->md.flags &= ~MDF_AL_DISABLED; in drbd_adm_disk_opts()
1413 device->ldev->md.flags |= MDF_AL_DISABLED; in drbd_adm_disk_opts()
1721 D_ASSERT(device, device->ldev == NULL); in drbd_adm_attach()
1722 device->ldev = nbc; in drbd_adm_attach()
1730 drbd_bump_write_ordering(device->resource, device->ldev, WO_bdev_flush); in drbd_adm_attach()
1732 if (drbd_md_test_flag(device->ldev, MDF_CRASHED_PRIMARY)) in drbd_adm_attach()
1737 if (drbd_md_test_flag(device->ldev, MDF_PRIMARY_IND) && in drbd_adm_attach()
1746 drbd_reconsider_max_bio_size(device, device->ldev); in drbd_adm_attach()
1764 drbd_md_test_flag(device->ldev, MDF_PRIMARY_IND) && in drbd_adm_attach()
1765 !drbd_md_test_flag(device->ldev, MDF_CONNECTED_IND)) in drbd_adm_attach()
1775 if (drbd_md_test_flag(device->ldev, MDF_FULL_SYNC) || in drbd_adm_attach()
1777 drbd_md_test_flag(device->ldev, MDF_AL_DISABLED))) { in drbd_adm_attach()
1804 if (drbd_md_test_flag(device->ldev, MDF_CONSISTENT)) { in drbd_adm_attach()
1805 if (drbd_md_test_flag(device->ldev, MDF_WAS_UP_TO_DATE)) in drbd_adm_attach()
1813 if (drbd_md_test_flag(device->ldev, MDF_PEER_OUT_DATED)) in drbd_adm_attach()
1818 (ns.pdsk == D_OUTDATED || rcu_dereference(device->ldev->disk_conf)->fencing == FP_DONT_CARE)) in drbd_adm_attach()
1826 if (rcu_dereference(device->ldev->disk_conf)->al_updates) in drbd_adm_attach()
1827 device->ldev->md.flags &= ~MDF_AL_DISABLED; in drbd_adm_attach()
1829 device->ldev->md.flags |= MDF_AL_DISABLED; in drbd_adm_attach()
1856 device->ldev->md.uuid[UI_CURRENT] |= (u64)1; in drbd_adm_attach()
1858 device->ldev->md.uuid[UI_CURRENT] &= ~(u64)1; in drbd_adm_attach()
2029 enum drbd_fencing_p fp = rcu_dereference(device->ldev->disk_conf)->fencing; in _check_net_options()
2516 rs.al_stripes = device->ldev->md.al_stripes; in drbd_adm_resize()
2517 rs.al_stripe_size = device->ldev->md.al_stripe_size_4k * 4; in drbd_adm_resize()
2544 u_size = rcu_dereference(device->ldev->disk_conf)->disk_size; in drbd_adm_resize()
2554 if (device->ldev->md.al_stripes != rs.al_stripes || in drbd_adm_resize()
2555 device->ldev->md.al_stripe_size_4k != rs.al_stripe_size / 4) { in drbd_adm_resize()
2576 if (device->ldev->known_size != drbd_get_capacity(device->ldev->backing_bdev)) in drbd_adm_resize()
2577 device->ldev->known_size = drbd_get_capacity(device->ldev->backing_bdev); in drbd_adm_resize()
2581 old_disk_conf = device->ldev->disk_conf; in drbd_adm_resize()
2584 rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); in drbd_adm_resize()
2961 disk_conf = rcu_dereference(device->ldev->disk_conf); in nla_put_status_info()
2996 spin_lock_irq(&device->ldev->md.uuid_lock); in nla_put_status_info()
2997 err = nla_put(skb, T_uuids, sizeof(si->uuids), device->ldev->md.uuid); in nla_put_status_info()
2998 spin_unlock_irq(&device->ldev->md.uuid_lock); in nla_put_status_info()
3003 if (nla_put_u32(skb, T_disk_flags, device->ldev->md.flags) || in nla_put_status_info()
3360 device->ldev->md.uuid[UI_CURRENT] == UUID_JUST_CREATED && args.clear_bm) { in drbd_adm_new_c_uuid()