]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: change block file mkfs behavior
authorSage Weil <sage@redhat.com>
Wed, 3 Feb 2016 15:51:01 +0000 (10:51 -0500)
committerSage Weil <sage@redhat.com>
Thu, 4 Feb 2016 02:43:50 +0000 (21:43 -0500)
commit316810d7e74a6a717c262522cbed00c89b0cb86b
tree9feb806a9b06621c5265e946bddbcb445cea69cd
parent2aeadc9acf1b0f2e030f36fe0ea2854779f4c4ae
os/bluestore: change block file mkfs behavior

Previously, if path was set, we'd make a symlink.  Otherwise, if
size was set, we'd create a file and resize it accordingly. This
means that setting the size means we create the block "device"
files, which is only useful for debugging, and we want to set a
size that can be used by ceph-disk when creating partitions.

Instead, if path is set, make a symlink.  Then/also, if size is
set, and the file/symlink points to a regular file, and that
regular file is 0 bytes, then resize it.  This way, vstart.sh
(or a dev) can just touch the file and then mkfs will size it up.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/vstart.sh