Skip to content

os/bluestore: check bluefs allocations on log replay - #31513

Merged
tchaikov merged 9 commits into
ceph:masterfrom
ifed01:wip-ifed-check-bluefs-allocs
Nov 24, 2019
Merged

tchaikov merged 9 commits into
ceph:masterfrom
ifed01:wip-ifed-check-bluefs-allocs

Conversation

@ifed01

@ifed01 ifed01 commented Nov 10, 2019 •

Copy link
Copy Markdown
Contributor

As bitmap allocator doesn't provide full consistency checking it might be useful for bluefs to do that on its own.

Signed-off-by: Igor Fedotov [email protected]

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@liewegas liewegas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Could add bluefs_log_replay_check_allocations = true to qa/tasks/ceph.conf.template too...

Comment thread src/common/options.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe default this to false, actually?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have it on by default. Otherwise IMO it's going to be void. Are you expecting much overhead due to this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not since it's only on replay. I was thinking that we'd have it on in the default teuthology config. This is fine, though!

@ifed01
ifed01 force-pushed the wip-ifed-check-bluefs-allocs branch 2 times, most recently from ad8bfee to 09b50d4 Compare November 14, 2019 12:07
Comment thread src/os/bluestore/bluestore_common.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recurring ceph_assert(pos < bs.size()); can became part of apply function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread src/os/bluestore/bluestore_common.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can put pos outside loop, and replace off += granularity with pos++, although I am almost certain that assembly for both on -O3 will be the same.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread src/os/bluestore/bluestore_common.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this apply function, but can it get more descriptive name, e.q : for_each_bit, or something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread src/os/bluestore/BlueFS.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, you want op_alloc_add in ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, forget to remove

Comment thread src/common/options.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: "Checks for allocations consistency during log replay".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ifed01
ifed01 force-pushed the wip-ifed-check-bluefs-allocs branch from 09b50d4 to 37128ed Compare November 18, 2019 09:20
@ifed01
ifed01 force-pushed the wip-ifed-check-bluefs-allocs branch from 6fe260b to b162f94 Compare November 18, 2019 09:53
@ifed01
ifed01 force-pushed the wip-ifed-check-bluefs-allocs branch from b162f94 to ffba2bb Compare November 18, 2019 10:09
@ifed01

ifed01 commented Nov 19, 2019

Copy link
Copy Markdown
Contributor Author

@tchaikov - yes, please rerun

@tchaikov
tchaikov merged commit 8b9ffa6 into ceph:master Nov 24, 2019
@ifed01
ifed01 deleted the wip-ifed-check-bluefs-allocs branch November 24, 2019 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants