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

hammer: osd: crash on EIO during deep-scrubbing #11935

Merged
merged 1 commit into from Nov 23, 2016
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion src/osd/ECBackend.cc
Expand Up @@ -1778,6 +1778,9 @@ void ECBackend::be_deep_scrub(
if (stride % sinfo.get_chunk_size())
stride += sinfo.get_chunk_size() - (stride % sinfo.get_chunk_size());
uint64_t pos = 0;

uint32_t fadvise_flags = CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL | CEPH_OSD_OP_FLAG_FADVISE_DONTNEED;

while (true) {
bufferlist bl;
handle.reset_tp_timeout();
Expand All @@ -1787,7 +1790,7 @@ void ECBackend::be_deep_scrub(
poid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
pos,
stride, bl,
true);
fadvise_flags, true);
if (r < 0)
break;
if (bl.length() % sinfo.get_chunk_size()) {
Expand Down
5 changes: 4 additions & 1 deletion src/osd/ReplicatedBackend.cc
Expand Up @@ -750,13 +750,16 @@ void ReplicatedBackend::be_deep_scrub(
bufferlist bl, hdrbl;
int r;
__u64 pos = 0;

uint32_t fadvise_flags = CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL | CEPH_OSD_OP_FLAG_FADVISE_DONTNEED;

while ( (r = store->read(
coll,
ghobject_t(
poid, ghobject_t::NO_GEN, get_parent()->whoami_shard().shard),
pos,
cct->_conf->osd_deep_scrub_stride, bl,
true)) > 0) {
fadvise_flags, true)) > 0) {
handle.reset_tp_timeout();
h << bl;
pos += bl.length();
Expand Down