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

os/bluestore: do SSD discard on mkfs #20897

Merged
merged 1 commit into from Mar 15, 2018

Conversation

ifed01
Copy link
Contributor

@ifed01 ifed01 commented Mar 14, 2018

Signed-off-by: Igor Fedotov ifedotov@suse.com

@@ -4316,7 +4316,7 @@ int BlueStore::_open_bdev(bool create)
assert(bdev == NULL);
string p = path + "/block";
bdev = BlockDevice::create(cct, p, aio_cb, static_cast<void*>(this), discard_cb, static_cast<void*>(this));
int r = bdev->open(p);
int r = bdev->open(p, create);
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be easier/cleaner to just add an if (discard_on_create) bdev->discard(...) after the three open() calls in _open_bdev(). A "create" mode on block device open feels like an awkward interface to me.

@ifed01 ifed01 force-pushed the wip-ifed-discard-on-mkfs branch 3 times, most recently from 18f58e0 to b40850c Compare March 14, 2018 14:45
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
@ifed01
Copy link
Contributor Author

ifed01 commented Mar 14, 2018

@liewegas - updated

@tchaikov tchaikov merged commit 363e948 into ceph:master Mar 15, 2018
@ifed01 ifed01 deleted the wip-ifed-discard-on-mkfs branch March 15, 2018 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants