]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
Copy range using fiemap not entire length
authorHaomai Wang <haomaiwang@gmail.com>
Fri, 11 Apr 2014 09:28:13 +0000 (17:28 +0800)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 29 Apr 2014 00:28:11 +0000 (17:28 -0700)
commitf674f36f4cb90ed7516c5f24eeb02af711a2c250
tree7faf2bb3c8386585ba566eac72754e82c732c3a6
parent3920f40afcad3bf54b4307d85b77dc0ff6094ca9
Copy range using fiemap not entire length

Under rbd usage, if a volume has tens of thousands of objects and each 4M
object only has several KB(run fio on this volume or other cases), this volume
will be very low performance during a long time after create snapshot on
this volume. The OSD will be busy with large bandwidth read/write although
the object actually has few bytes needed to be copied.

This commit try to use fiemap if backend fs support, it can skip unnecessary
range to write. It also can be beneficial to space effective, because the copied
object will be regard as snapshot object which is access infrequently.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
src/os/FileStore.cc
src/os/FileStore.h