~ubuntu-branches/ubuntu/precise/ceph/precise

« back to all changes in this revision

Viewing changes to src/osd/ReplicatedPG.cc

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2011-02-25 15:17:26 UTC
  • mfrom: (0.1.3 sid) (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110225151726-i4fh9xvh88ufvaux
Tags: 0.24.3-2
* Make Ceph Linux only and build on all Linux archs (closes: #614890).
* Support parallel building via DEB_BUILD_OPTIONS .
* Add watch file, thanks to Clint Byrum (closes: #615021).
* Tune packaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
481
481
    case CEPH_OSD_OP_PUSH:
482
482
      sub_op_push(op);
483
483
      return;
484
 
    case CEPH_OSD_OP_SCRUB:
485
 
      sub_op_scrub(op);
486
 
      return;
487
484
    case CEPH_OSD_OP_SCRUB_RESERVE:
488
485
      sub_op_scrub_reserve(op);
489
486
      return;
493
490
    case CEPH_OSD_OP_SCRUB_STOP:
494
491
      sub_op_scrub_stop(op);
495
492
      return;
 
493
    case CEPH_OSD_OP_SCRUB_MAP:
 
494
      sub_op_scrub_map(op);
 
495
      return;
496
496
    }
497
497
  }
498
498
 
509
509
      sub_op_push_reply(r);
510
510
      return;
511
511
 
512
 
    case CEPH_OSD_OP_SCRUB:
513
 
      sub_op_scrub_reply(r);
514
 
      return;
515
 
 
516
512
    case CEPH_OSD_OP_SCRUB_RESERVE:
517
513
      sub_op_scrub_reserve_reply(r);
518
514
      return;
525
521
 
526
522
bool ReplicatedPG::snap_trimmer()
527
523
{
528
 
  assert(is_primary() && is_clean());
529
524
  lock();
 
525
  if (!(is_primary() && is_clean() && is_active())) {
 
526
    unlock();
 
527
    return true;
 
528
  }
530
529
  dout(10) << "snap_trimmer start, purged_snaps " << info.purged_snaps << dendl;
531
530
 
532
531
  interval_set<snapid_t> s;
1656
1655
    }
1657
1656
  } else { //we got our context, let's use it to do the rollback!
1658
1657
    sobject_t& rollback_to_sobject = rollback_to->obs.oi.soid;
1659
 
    if (ctx->clone_obc &&
1660
 
        (ctx->clone_obc->obs.oi.soid.snap == snapid)) {
 
1658
    if (ctx->clone_obc && *ctx->clone_obc->obs.oi.snaps.rbegin() <= snapid) {
1661
1659
      //just cloned the rollback target, we don't need to do anything!
1662
 
    
1663
1660
    } else {
1664
1661
      /* 1) Delete current head
1665
1662
       * 2) Clone correct snapshot into head