From: Sage Weil Date: Fri, 9 Aug 2019 14:21:17 +0000 (-0500) Subject: os/bluestore/KernelDevice: fix RW_IO_MAX constant X-Git-Tag: v15.1.0~1874^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f7179daa6c17907f8fe38150183008e2d096109;p=ceph.git os/bluestore/KernelDevice: fix RW_IO_MAX constant This depends on the page size. See: https://github.com/torvalds/linux/blob/6e6d05360b80f196ed07061327f03346b204abea/include/linux/fs.h#L2305 https://github.com/torvalds/linux/blob/30d1d92a888d03681b927c76a35181b4eed7071f/tools/virtio/linux/kernel.h#L23 Fixes 4d33114a40d5ae0d541c36175977ca22789a3b88 Fixes: https://tracker.ceph.com/issues/41188 Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/KernelDevice.h b/src/os/bluestore/KernelDevice.h index 99dfb761837a..5cf59ed1986a 100644 --- a/src/os/bluestore/KernelDevice.h +++ b/src/os/bluestore/KernelDevice.h @@ -25,9 +25,7 @@ #include "ceph_aio.h" #include "BlockDevice.h" -#ifndef RW_IO_MAX -#define RW_IO_MAX 0x7FFFF000 -#endif +#define RW_IO_MAX (INT_MAX & CEPH_PAGE_MASK) class KernelDevice : public BlockDevice {