Clean up error reporting too.
// journal
open_journal();
r = journal_replay(initial_op_seq);
- if (r == -EINVAL) {
- dout(0) << "mount got EINVAL on journal open, not mounting" << dendl;
+ if (r < 0) {
+ char buf[40];
+ dout(0) << "mount failed to open journal " << journalpath << ": "
+ << strerror_r(-r, buf, sizeof(buf)) << dendl;
+ cerr << "mount failed to open journal " << journalpath << ": "
+ << strerror_r(-r, buf, sizeof(buf)) << std::endl;
return r;
}
journal_start();
int err = journal->open(op_seq+1);
if (err < 0) {
char buf[80];
- dout(3) << "journal_replay open failed with" << err
- << " " << strerror_r(err, buf, sizeof(buf)) << dendl;
+ dout(3) << "journal_replay open failed with "
+ << strerror_r(-err, buf, sizeof(buf)) << dendl;
delete journal;
journal = 0;
return err;