Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/cephfs: set dir_layout when injecting inodes #14234

merged 1 commit into from Apr 13, 2017
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+4 −0
Diff settings


Just for now

@@ -358,6 +358,7 @@ int MetadataDriver::inject_unlinked_inode(
// they don't have to mount the filesystem to correct it?
inode.inode.layout = file_layout_t::get_default();
inode.inode.layout.pool_id = data_pool_id;
inode.inode.dir_layout.dl_dir_hash = g_conf->mds_default_dir_hash;

// Assume that we will get our stats wrong, and that we may
// be ignoring dirfrags that exist
@@ -1636,6 +1637,8 @@ int MetadataDriver::inject_with_backtrace(
// accurate, but it should avoid functional issues.

ancestor_dentry.inode.dirstat.nfiles = 1;
ancestor_dentry.inode.dir_layout.dl_dir_hash =

ancestor_dentry.inode.nlink = 1;
ancestor_dentry.inode.ino = ino;
@@ -1982,6 +1985,7 @@ void MetadataTool::build_dir_dentry(
out-> = fragstat.mtime;

out->inode.layout = layout;
out->inode.dir_layout.dl_dir_hash = g_conf->mds_default_dir_hash;

out->inode.truncate_seq = 1;
out->inode.truncate_size = -1ull;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.