]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueFS: fix device_migrate_to_* to handle varying alloc sizes
authorSage Weil <sage@redhat.com>
Thu, 8 Aug 2019 18:30:59 +0000 (13:30 -0500)
committerVikhyat Umrao <vikhyat@redhat.com>
Tue, 19 Nov 2019 13:25:14 +0000 (05:25 -0800)
commitcf9c1dc50b1a915776ac0fca24322d9365b85359
treec46bbaabdac4798839c9a85d367ec5d619de86bf
parent626d2cbd3a1902f7d5b43f852fb48a6e1424ddfe
os/bluestore/BlueFS: fix device_migrate_to_* to handle varying alloc sizes

The previous implementation moved extents individually.  This caused
problems when moving an extent with a small alloc_size that wasn't
a multiple of the target device's alloc_size.

Instead, identify files with extents that need to be moved, and then read
the file in its entirety and rewrite it in its entirety.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 94269741959a4280225b6330dfb015f1799fd1f2)
src/os/bluestore/BlueFS.cc