]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueFS: pre-extend file size for WAL (.log) files 12265/head
authorSage Weil <sage@redhat.com>
Thu, 1 Dec 2016 19:36:37 +0000 (14:36 -0500)
committerSage Weil <sage@redhat.com>
Mon, 5 Dec 2016 18:46:52 +0000 (13:46 -0500)
commit9ae9e641580198c0ec520a0fa4364bf5b75a0734
treeb3b133efd838da65d10ec2fcb7c6785723325f14
parent73ffab4fe6792a1f6b3797c34b421ebb2027f310
os/bluestore/BlueFS: pre-extend file size for WAL (.log) files

When rocksdb has log recycling on (this is required!), it will
do robust checksums on log records and change playback behavior
to tolerate trailing garbage in the log file.  This normally
allows it to overwrite previous log files, but it can also let
us overwrite arbitrary garbage on the device.

If we allocate some new space for a .log file (already indicated
by the WRITER_WAL hint), extend the size immediately so that each
subsequent append doesn't have to (unless/until we do another
allocation).

This is safe as long as rocksdb recycling is enabled (which it is
by default).

This is faster because we don't have to flush the bluefs log on
every log append during the period after startup before rocksdb
starts recycling log files.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/os/bluestore/BlueFS.cc