mds: don't cow already cowed dentry

This commit is contained in:
Sage Weil 2010-04-20 12:39:23 -07:00
parent 93058af345
commit c719f4e442

View File

@ -1312,7 +1312,8 @@ void MDCache::journal_cow_dentry(Mutation *mut, EMetaBlob *metablob, CDentry *dn
if (follows == CEPH_NOSNAP)
follows = in->find_snaprealm()->get_newest_snap();
if (in->get_projected_parent_dn() != dn) {
if (in->get_projected_parent_dn() != dn &&
follows+1 > dn->first) {
snapid_t oldfirst = dn->first;
dn->first = follows+1;
CDentry *olddn = dn->dir->add_remote_dentry(dn->name, in->ino(), in->d_type(),