From a1e459432a17319bf08f4de5913dd060645230d9 Mon Sep 17 00:00:00 2001 From: sage Date: Sat, 25 Feb 2006 07:59:19 +0000 Subject: [PATCH] import/export filelock transitions git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@678 29311d96-e01e-0410-9327-a35deaab8ce9 --- ceph/mds/MDCache.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ceph/mds/MDCache.cc b/ceph/mds/MDCache.cc index 8021a37a87a54..d2c5a8a72f021 100644 --- a/ceph/mds/MDCache.cc +++ b/ceph/mds/MDCache.cc @@ -6091,10 +6091,14 @@ void MDCache::encode_export_inode(CInode *in, bufferlist& enc_state, int new_aut in->filelock.set_state(LOCK_LOCK); if (in->filelock.get_state() == LOCK_GMIXEDR) in->filelock.set_state(LOCK_MIXED); + // this looks like a step backwards, but it's what we want! if (in->filelock.get_state() == LOCK_GSYNCM) - in->filelock.set_state(LOCK_SYNC); - if (in->filelock.get_state() == LOCK_GMIXEDW) in->filelock.set_state(LOCK_MIXED); + if (in->filelock.get_state() == LOCK_GSYNCW) + in->filelock.set_state(LOCK_LOCK); + if (in->filelock.get_state() == LOCK_GMIXEDW) + in->filelock.set_state(LOCK_LOCK); + //in->filelock.set_state(LOCK_MIXED); // mark auth assert(in->is_auth()); -- 2.39.5