~ubuntu-branches/ubuntu/trusty/ceph/trusty-updates

« back to all changes in this revision

Viewing changes to src/mds/Locker.cc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-04-09 11:14:03 UTC
  • mfrom: (1.1.33)
  • Revision ID: package-import@ubuntu.com-20140409111403-jlql95pa8kg1nk9a
Tags: 0.79-0ubuntu1
* New upstream release (LP: #1278466):
  - d/p/modules.patch: Refreshed.
  - d/ceph.install: Install all jerasure modules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1298
1298
  CInode *in = static_cast<CInode *>(lock->get_parent());
1299
1299
  client_t client = mut->get_client();
1300
1300
  bool want_scatter = !nowait && lock->get_parent()->is_auth() &&
1301
 
                      (in->has_subtree_root_dirfrag() ||
 
1301
                      (in->has_subtree_or_exporting_dirfrag() ||
1302
1302
                       static_cast<ScatterLock*>(lock)->get_scatter_wanted());
1303
1303
 
1304
1304
  while (1) {
1799
1799
    // add in any xlocker-only caps (for locks this client is the xlocker for)
1800
1800
    allowed |= xlocker_allowed & in->get_xlocker_mask(it->first);
1801
1801
 
 
1802
    Session *session = mds->get_session(it->first);
1802
1803
    if (in->inode.inline_version != CEPH_INLINE_NONE &&
1803
 
        !mds->get_session(it->first)->connection->has_feature(CEPH_FEATURE_MDS_INLINE_DATA))
 
1804
        !(session && session->connection &&
 
1805
          session->connection->has_feature(CEPH_FEATURE_MDS_INLINE_DATA)))
1804
1806
      allowed &= ~(CEPH_CAP_FILE_RD | CEPH_CAP_FILE_WR);
1805
1807
 
1806
1808
    int pending = cap->pending();
3920
3922
  }
3921
3923
 
3922
3924
  CInode *in = static_cast<CInode*>(lock->get_parent());
3923
 
  if (!in->has_subtree_root_dirfrag() || in->is_base()) {
 
3925
  if (!in->has_subtree_or_exporting_dirfrag() || in->is_base()) {
3924
3926
    // i _should_ be sync.
3925
3927
    if (!lock->is_wrlocked() &&
3926
3928
        lock->get_state() != LOCK_SYNC) {
4284
4286
           !lock->is_rdlocked() &&
4285
4287
           //!lock->is_waiter_for(SimpleLock::WAIT_WR) &&
4286
4288
           ((wanted & (CEPH_CAP_GWR|CEPH_CAP_GBUFFER)) ||
4287
 
            (in->inode.is_dir() && !in->has_subtree_root_dirfrag())) &&
 
4289
            (in->inode.is_dir() && !in->has_subtree_or_exporting_dirfrag())) &&
4288
4290
           in->get_target_loner() >= 0) {
4289
4291
    dout(7) << "file_eval stable, bump to loner " << *lock
4290
4292
            << " on " << *lock->get_parent() << dendl;
4308
4310
           !lock->is_waiter_for(SimpleLock::WAIT_WR) &&
4309
4311
           !(wanted & (CEPH_CAP_GWR|CEPH_CAP_GBUFFER)) &&
4310
4312
           !((lock->get_state() == LOCK_MIX) &&
4311
 
             in->is_dir() && in->has_subtree_root_dirfrag())  // if we are a delegation point, stay where we are
 
4313
             in->is_dir() && in->has_subtree_or_exporting_dirfrag())  // if we are a delegation point, stay where we are
4312
4314
           //((wanted & CEPH_CAP_RD) || 
4313
4315
           //in->is_replicated() || 
4314
4316
           //lock->get_num_client_lease() ||