inode->get();
}
void finish(int r) {
+ // _async_invalidate takes the lock when it needs to, call this back from outside of lock.
+ assert(!client->client_lock.is_locked_by_me());
client->_async_invalidate(inode, offset, length, keep_caps);
}
};
in->get();
}
void finish(int) {
+ // I am used via ObjectCacher, which is responsible for taking
+ // the client lock before calling me back.
+ assert(client->client_lock.is_locked_by_me());
client->put_inode(in);
}
};
ino.ino = inodeno_t();
}
void finish(int r) {
+ // _async_dentry_invalidate is responsible for its own locking
+ assert(!client->client_lock.is_locked_by_me());
client->_async_dentry_invalidate(dirino, ino, name);
}
};
public:
C_C_Tick(Client *c) : client(c) {}
void finish(int r) {
+ // Called back via Timer, which takes client_lock for us
+ assert(client->client_lock.is_locked_by_me());
client->tick();
}
};
in->get();
}
void finish(int) {
+ // Called back by Filter, then Client is responsible for taking its own lock
+ assert(!cl->client_lock.is_locked_by_me());
cl->sync_write_commit(in);
}
};
void Client::sync_write_commit(Inode *in)
{
+ Mutex::Locker l(client_lock);
+
assert(unsafe_sync_write > 0);
unsafe_sync_write--;
r = filer->write_trunc(in->ino, &in->layout, in->snaprealm->get_snap_context(),
offset, size, bl, ceph_clock_now(cct), 0,
in->truncate_size, in->truncate_seq,
- onfinish, onsafe);
+ onfinish, new C_OnFinisher(onsafe, &objecter_finisher));
if (r < 0)
goto done;
in->snaprealm->get_snap_context(),
offset, length,
ceph_clock_now(cct),
- 0, true, onfinish, onsafe);
+ 0, true, onfinish, new C_OnFinisher(onsafe, &objecter_finisher));
if (r < 0)
goto done;
friend class C_Client_CacheInvalidate; // calls ino_invalidate_cb
friend class C_Client_DentryInvalidate; // calls dentry_invalidate_cb
friend class C_Block_Sync; // Calls block map and protected helpers
+ friend class C_C_Tick; // Asserts on client_lock
+ friend class C_Client_SyncCommit; // Asserts on client_lock
//int get_cache_size() { return lru.lru_get_size(); }
//void set_cache_size(int m) { lru.lru_set_max(m); }