Lines Matching refs:ldev
655 fp = mdev->ldev->dc.fencing;
772 fp = mdev->ldev->dc.fencing;
865 if (mdev->ed_uuid == mdev->ldev->md.uuid[UI_CURRENT]) {
1065 u32 mdf = mdev->ldev->md.flags & ~(MDF_CONSISTENT|MDF_PRIMARY_IND|
1082 if (mdf != mdev->ldev->md.flags) {
1083 mdev->ldev->md.flags = mdf;
1087 drbd_set_ed_uuid(mdev, mdev->ldev->md.uuid[UI_CURRENT]);
1176 fp = mdev->ldev->dc.fencing;
1218 mdev->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) {
1227 if (ns.peer == R_PRIMARY && mdev->ldev->md.uuid[UI_BITMAP] == 0)
1275 eh = mdev->ldev->dc.on_io_error;
1311 drbd_free_bc(mdev->ldev);
1312 mdev->ldev = NULL;);
1726 p.uuid[i] = mdev->ldev ? cpu_to_be64(mdev->ldev->md.uuid[i]) : 0;
1770 D_ASSERT(mdev->ldev->backing_bdev);
1771 d_size = drbd_get_max_capacity(mdev->ldev);
1772 u_size = mdev->ldev->dc.disk_size;
2006 if (drbd_md_test_flag(mdev->ldev, MDF_FULL_SYNC)) {
2966 q = bdev_get_queue(mdev->ldev->backing_bdev);
3176 void drbd_free_bc(struct drbd_backing_dev *ldev)
3178 if (ldev == NULL)
3181 bd_release(ldev->backing_bdev);
3182 bd_release(ldev->md_bdev);
3184 fput(ldev->lo_file);
3185 fput(ldev->md_file);
3187 kfree(ldev);
3225 drbd_free_bc(mdev->ldev);
3226 mdev->ldev = NULL;);
3273 buffer->uuid[i] = cpu_to_be64(mdev->ldev->md.uuid[i]);
3274 buffer->flags = cpu_to_be32(mdev->ldev->md.flags);
3277 buffer->md_size_sect = cpu_to_be32(mdev->ldev->md.md_size_sect);
3278 buffer->al_offset = cpu_to_be32(mdev->ldev->md.al_offset);
3281 buffer->device_uuid = cpu_to_be64(mdev->ldev->md.device_uuid);
3283 buffer->bm_offset = cpu_to_be32(mdev->ldev->md.bm_offset);
3285 D_ASSERT(drbd_md_ss__(mdev, mdev->ldev) == mdev->ldev->md.md_offset);
3286 sector = mdev->ldev->md.md_offset;
3288 if (drbd_md_sync_page_io(mdev, mdev->ldev, sector, WRITE)) {
3297 /* Update mdev->ldev->md.la_size_sect,
3299 mdev->ldev->md.la_size_sect = drbd_get_capacity(mdev->this_bdev);
3400 mdev->ldev->md.uuid[i+1] = mdev->ldev->md.uuid[i];
3414 mdev->ldev->md.uuid[idx] = val;
3421 if (mdev->ldev->md.uuid[idx]) {
3423 mdev->ldev->md.uuid[UI_HISTORY_START] = mdev->ldev->md.uuid[idx];
3440 D_ASSERT(mdev->ldev->md.uuid[UI_BITMAP] == 0);
3441 mdev->ldev->md.uuid[UI_BITMAP] = mdev->ldev->md.uuid[UI_CURRENT];
3449 if (mdev->ldev->md.uuid[UI_BITMAP] == 0 && val == 0)
3454 mdev->ldev->md.uuid[UI_HISTORY_START] = mdev->ldev->md.uuid[UI_BITMAP];
3455 mdev->ldev->md.uuid[UI_BITMAP] = 0;
3457 if (mdev->ldev->md.uuid[UI_BITMAP])
3460 mdev->ldev->md.uuid[UI_BITMAP] = val;
3461 mdev->ldev->md.uuid[UI_BITMAP] &= ~((u64)1);
3605 if ((mdev->ldev->md.flags & flag) != flag) {
3607 mdev->ldev->md.flags |= flag;
3613 if ((mdev->ldev->md.flags & flag) != 0) {
3615 mdev->ldev->md.flags &= ~flag;