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

os/bluestore: ceph-bluefs-tool fixes #8292

Merged
merged 1 commit into from Mar 29, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/os/bluestore/bluefs_tool.cc
Expand Up @@ -14,6 +14,11 @@

#include "os/bluestore/BlueFS.h"

void usage(char **argv)
{
cout << argv[0] << " <outdir> <bdev[0..2]>" << std::endl;;
}

int main(int argc, char **argv)
{
vector<const char*> args;
Expand All @@ -29,6 +34,11 @@ int main(int argc, char **argv)

BlueFS fs;

if (args.size() != 4) {
usage(argv);
exit(-1);
}

cout << "args " << args << std::endl;
string outdir = args[0];
for (unsigned i = 1; i < args.size(); ++i) {
Expand Down Expand Up @@ -73,7 +83,7 @@ int main(int argc, char **argv)
r = fs.read(h, &h->buf, pos, left, &bl, NULL);
assert(r > 0);
int rc = bl.write_fd(fd);
assert(rc == r);
assert(rc == 0);
pos += r;
left -= r;
}
Expand Down