]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: set dir layout during replay
authorSage Weil <sage@newdream.net>
Tue, 5 Oct 2010 18:14:19 +0000 (11:14 -0700)
committerSage Weil <sage@newdream.net>
Tue, 5 Oct 2010 18:54:25 +0000 (11:54 -0700)
Need to copy layout from the EMetaBlob::fullbit into the inode.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/journal.cc

index 218cd056c0df553d3cf4e25f7a1193e134d3def3..5cb14337d9311138d2048db51856a89378d09e6b 100644 (file)
@@ -373,6 +373,8 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg)
     in->xattrs = root->xattrs;
     if (in->inode.is_dir()) {
       in->dirfragtree = root->dirfragtree;
+      delete in->default_layout;
+      in->default_layout = root->dir_layout;
       /*
        * we can do this before linking hte inode bc the split_at would
        * be a no-op.. we have no children (namely open snaprealms) to
@@ -469,6 +471,8 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg)
        in->xattrs = p->xattrs;
        if (in->inode.is_dir()) {
          in->dirfragtree = p->dirfragtree;
+         delete in->default_layout;
+         in->default_layout = p->dir_layout;
          /*
           * we can do this before linking hte inode bc the split_at would
           * be a no-op.. we have no children (namely open snaprealms) to
@@ -507,6 +511,8 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg)
        in->xattrs = p->xattrs;
        if (in->inode.is_dir()) {
          in->dirfragtree = p->dirfragtree;
+         delete in->default_layout;
+         in->default_layout = p->dir_layout;
          in->decode_snap_blob(p->snapbl);
        }
        if (in->inode.is_symlink()) in->symlink = p->symlink;