]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
FileJournal: Remove CEPH_PAGE_SIZE assumptions 4864/head
authorSteve Capper <steve.capper@linaro.org>
Wed, 6 May 2015 12:04:37 +0000 (12:04 +0000)
committerSteve Capper <steve.capper@linaro.or>
Thu, 4 Jun 2015 14:14:32 +0000 (15:14 +0100)
commit2eb096a5be8e00abfa0c104c07339191d9df3737
tree622b9474c0588664f3545ac2c01e42e340d51fd4
parentbd7989103911796eb5698cf208b0ccdc3370d707
FileJournal: Remove CEPH_PAGE_SIZE assumptions

Ceph currently assumes a FileJournal block_size equal to a multiple of
CEPH_PAGE_SIZE. For x86, this will always be 4KB which matches the sector
size of Advanced Format drives, and works quite well.

Other architectures, such as ARM and PowerPC, can have a much larger
CEPH_PAGE_SIZE == PAGE_SIZE (64KB).

Unfortunately, a block_size of 64KB can lead to a significant increase
in the amount of disk activity required by the journal over one with a
block_size of 4KB (especially when carrying out a lot of 4KB writes).

This patch removes the assumption from the FileJournal that the
block_size should always be at least CEPH_PAGE_SIZE, and replaces it
with the assumption that this should be at least:
CEPH_MINIMUM_BLOCK_SIZE == 4KB.

For PAGE_SIZE values of 4KB (for x86 say), this patch shouldn't lead
to any change in behaviour.

For a 64KB PAGE_SIZE where the FileJournal is hosted on a block device
directly, the block_size will go down from 64KB to 4KB with this patch.
Where the FileJournal is hosted on an ext4 filesystem we will see a
similar reduction in block_size. If the FileJournal is hosted on an
XFS or btrfs filesystem then we won't see any reduction in the block_size
(because both XFS and btrfs return the PAGE_CACHE_SIZE as the minimum io
block size in fstat).

Signed-off-by: Steve Capper <steve.capper@linaro.org>
src/os/FileJournal.cc