Skip to content

Commit 2092ad0

Browse files
committed
crimson/os/seastore: Remove error on expected logic
In read_meta we should not use ERROR when the key is not found as this is expected. Same in _mkfs, if mkfs_done exists we shouldn't use ERROR. This can be confusing when debugging is disabled and few ERROR log lines are printed. Signed-off-by: Matan Breizman <[email protected]>
1 parent 5aade0e commit 2092ad0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/crimson/os/seastore/device.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ check_create_device_ret check_create_device(
8383
return seastar::now();
8484
} catch (const std::system_error &e) {
8585
if (e.code().value() == EEXIST) {
86-
ERROR("path={} exists", path);
86+
DEBUG("path={} exists", path);
8787
return seastar::now();
8888
} else {
8989
ERROR("path={} creation error -- {}", path, e);

src/crimson/os/seastore/seastore.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,10 @@ Device::access_ertr::future<> SeaStore::_mkfs(uuid_d new_osd_fsid)
438438
// todo: read_meta to return errorator
439439
auto [done, value] = co_await read_meta("mkfs_done");
440440
if (done == 0) {
441-
ERROR("failed");
441+
DEBUG("mkfs_done exists, Skipping mkfs");
442442
co_return;
443443
}
444+
DEBUG("mkfs_done does not exist, starting mkfs");
444445
secondary_device_set_t sds;
445446
if (!root.empty()) {
446447
seastar::file rdir = co_await seastar::open_directory(root);
@@ -2323,7 +2324,7 @@ SeaStore::read_meta(const std::string& key)
23232324
DEBUG("key={}, value={}", key, *v);
23242325
return std::make_tuple(0, std::move(*v));
23252326
} else {
2326-
ERROR("key={} failed", key);
2327+
DEBUG("key={} coudln't find key:", key);
23272328
return std::make_tuple(-1, std::string(""));
23282329
}
23292330
}).handle_error(

0 commit comments

Comments
 (0)