]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueFS: do not dirty file when overwriting bytes
authorSage Weil <sage@redhat.com>
Mon, 21 Dec 2015 20:33:38 +0000 (15:33 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:20 +0000 (13:07 -0500)
commitbe598b7fca7328f39c4004884cb0c0941db513b9
tree3238e7293203906e1b223ef1bc52a2fd6ed311e3
parent1605e04d6504f2d30be83f7cfdd9141b819fb35d
os/bluestore/BlueFS: do not dirty file when overwriting bytes

The rocksdb log recycle option allows us to overwrite previously
allocated space in an old log file to avoid updating the file
metadata on normal file systems.  Take advantage of that here to
by implementing what is effectively O_NOCMTIME semantics: we do
not dirty the file metadata just because mtime is updated.
Instead, we dirty the file only if we allocate new space or if
the size has to be increased.

Note that on my NVME drive a single-thread rados bench test, we
jump from 30MB/sec to 50MB/sec 128KB writes as soon as we start
recycling previous logs (about 40 second into the run).

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