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: clean up flush logic #14162

Merged
merged 1 commit into from Apr 1, 2017

Conversation

Projects
None yet
2 participants
@majianpeng
Member

majianpeng commented Mar 27, 2017

@liewegas . We talked this topic by mail. But I think show code is better. So I send this PR.
This PR don't include data device and wal device are different partitions of the same device. Because I notice you already had a PR about this.

Show outdated Hide outdated src/os/bluestore/BlueStore.cc
@@ -4057,7 +4057,6 @@ int BlueStore::_open_db(bool create)
bluefs->get_block_device_size(BlueFS::BDEV_DB) - BLUEFS_START);
}
bluefs_shared_bdev = BlueFS::BDEV_SLOW;
bluefs_single_shared_device = false;

This comment has been minimized.

@liewegas

liewegas Mar 28, 2017

Member

This isn't sufficient because bluefs isn't guaranteed to do the wal write on the wal device. If the device is small and fills up it'll end up on another device.

@liewegas

liewegas Mar 28, 2017

Member

This isn't sufficient because bluefs isn't guaranteed to do the wal write on the wal device. If the device is small and fills up it'll end up on another device.

Show outdated Hide outdated src/os/bluestore/BlueStore.cc
force_flush = true;
}

This comment has been minimized.

@liewegas

liewegas Mar 28, 2017

Member

This isn't correct. We need to make sure the aio for a set of transactions is stable and durable on the device before we commit the metadata. If we do it all at once we can't ensure that the data is durable before the metadata, and a crash might mean that the metadata made it to disk but the data did not, resulting in corrupted state.

@liewegas

liewegas Mar 28, 2017

Member

This isn't correct. We need to make sure the aio for a set of transactions is stable and durable on the device before we commit the metadata. If we do it all at once we can't ensure that the data is durable before the metadata, and a crash might mean that the metadata made it to disk but the data did not, resulting in corrupted state.

@liewegas liewegas changed the title from {RFC]Optimize bluestore force flush to os/bluestore: clean up flush logic Mar 28, 2017

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Mar 28, 2017

Member

The first patch is definitely much clearer! The other two changes aren't correct, though. :(

Member

liewegas commented Mar 28, 2017

The first patch is definitely much clearer! The other two changes aren't correct, though. :(

@majianpeng

This comment has been minimized.

Show comment
Hide comment
@majianpeng

majianpeng Mar 28, 2017

Member

@liewegas . Thanks your quickly response. Update.

Member

majianpeng commented Mar 28, 2017

@liewegas . Thanks your quickly response. Update.

os/bluestore/BlueStore: make code more readable.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>

@liewegas liewegas merged commit 841de70 into ceph:master Apr 1, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@majianpeng majianpeng deleted the majianpeng:optimize-bluestore-force-flush branch Apr 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment