*** empty log message ***

git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@54 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
sage 2004-07-30 00:12:55 +00:00
parent 94ba59e9cf
commit 0077a02292
4 changed files with 17 additions and 11 deletions

View File

@ -40,6 +40,8 @@ CInode::CInode() : LRUObject() {
nested_hard_pinned = 0;
// state = 0;
version = 0;
auth = true; // by default.
}

View File

@ -274,14 +274,14 @@ bool MDStore::commit_dir( CInode *in,
// already committing?
if (in->dir->state_test(CDIR_STATE_COMMITTING)) {
// already mid-commit!
dout(7) << "commit_dir dir " << *in << " already mid-commit" << endl;
dout(7) << "commit_dir " << *in << " already mid-commit" << endl;
in->dir->add_waiter(c); // FIXME this isprobably a bad idea?
return false;
}
if (!in->dir->can_hard_pin()) {
// something must be frozen up the hiearchy!
dout(7) << "commit_dir dir " << *in << " can't hard_pin, waiting" << endl;
dout(7) << "commit_dir " << *in << " can't hard_pin, waiting" << endl;
in->dir->add_hard_pin_waiter( new C_MDS_CommitDirDelay(mds, in->inode.ino, c) );
return false;
}
@ -289,14 +289,14 @@ bool MDStore::commit_dir( CInode *in,
// is it complete?
if (!in->dir->is_complete()) {
dout(7) << "commit_dir dir " << *in << " not complete, fetching first" << endl;
dout(7) << "commit_dir " << *in << " not complete, fetching first" << endl;
// fetch dir first
Context *fin = new MDFetchForCommitContext(this, in, c);
fetch_dir(in, fin);
return false;
}
dout(7) << "commit_dir dir " << *in << endl;
dout(7) << "commit_dir " << *in << endl;
// get continuation ready
MDCommitDirContext *fin = new MDCommitDirContext(this, in, c);
@ -361,9 +361,9 @@ bool MDStore::commit_dir_2( int result,
CInode *in = it->second->get_inode();
if (in->get_parent_dir_version() == committed_version) {
in->mark_clean(); // might not but could be dirty
dout(5) << "inode " << *(in) << " now clean" << endl;
dout(5) << " now clean " << *(in) << endl;
} else {
dout(5) << "inode " << *(in) << " still dirty after a commit" << endl;
dout(5) << " still dirty " << *(in) << endl;
}
}

View File

@ -27,9 +27,10 @@ class C_EIU_VerifyInodeUpdate : public Context {
virtual void finish(int r) {
CInode *in = mds->mdcache->get_inode(ino);
if (in) {
// make sure it's clean, or a different version.
if (in->is_dirty() &&
in->get_version() == version) {
// if it's mine, dirty, and the same version, commit
if (in->authority(mds->get_cluster()) == mds->get_nodeid() && // mine
in->is_dirty() && // dirty
in->get_version() == version) { // same version that i have to deal with
cout << "ARGH, did EInodeUpdate commit but inode is still dirty" << endl;
// damnit
mds->mdstore->commit_dir(in->get_parent_inode(),
@ -80,8 +81,10 @@ class EInodeUpdate : public LogEvent {
cout << "inode " << inode.ino << " not in cache, must have exported" << endl;
return true;
}
if (in->authority(mds->get_cluster()) != mds->get_nodeid())
return true; // not my inode anymore!
if (in->get_version() != version)
return true; // i'm obsolete!
return true; // i'm obsolete! (another log entry follows)
return false;
}

View File

@ -34,12 +34,13 @@
#include "config.h"
/* sandwich mds's, then osd's, then clients */
#define MSG_ADDR_MDS(x) (x)
#define MSG_ADDR_OSD(x) (NUMMDS+(x))
#define MSG_ADDR_CLIENT(x) (NUMMDS+NUMOSD+(x))
#define MSG_ADDR_TYPE(x) ((x)<NUMMDS ? "mds":((x)<(NUMMDS+NUMOSD) ? "osd":"client"))
#define MSG_ADDR_NUM(x) ((x)<NUMMDS ? (x) : \
#define MSG_ADDR_NUM(x) ((x)<NUMMDS ? (x) : \
((x)<(NUMMDS+NUMOSD) ? ((x)-NUMMDS) : \
((x)-(NUMMDS+NUMOSD))))
#define MSG_ADDR_NICE(x) MSG_ADDR_TYPE(x) << MSG_ADDR_NUM(x)