Project

General

Profile

Bug #1435 » cdir-fetch-recover-dir-layout.patch

patch that seems to fix the bug - Alexandre Oliva, 02/16/2013 06:31 PM

View differences:

src/mds/CDir.cc
// symlink?
if (in->is_symlink())
in->symlink = symlink;
else if (in->is_dir()) {
default_file_layout dfl;
memset(&dfl, 0, sizeof(dfl));
// FIXME: this should be properly encoded
if (memcmp (&dfl.layout, &in->inode.layout, sizeof(dfl)) != 0) {
in->default_layout_() = new default_file_layout;
memcpy (&in->default_layout_()->layout,
&in->inode.layout, sizeof(dfl));
}
}
in->dirfragtree.swap(fragtree);
in->xattrs.swap(xattrs);
(2-2/2)