[Devel] [PATCH RHEL8 COMMIT] ploop: Read metadata page-aligned
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Jul 2 22:51:52 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.51
------>
commit 4cd4788062fe06933a240db244c427dc50e11063
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Fri Jul 2 22:51:51 2021 +0300
ploop: Read metadata page-aligned
File open with O_DIRECT results in direct read,
even if we do that synchronous from kernel.
iov_iter_get_pages()
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
==========================
ploop: Stop using kvec
We can't read using kvec from file open with O_DIRECT.
This makes ploop to stop use it.
Kirill Tkhai (8):
ploop: Read metadata page-aligned
ploop: RAW image does not have header
ploop: Introduce ploop_init_be_iter()
ploop: Introduce rb_root_for_each_md_page()
ploop: Introduce md helpers
ploop: Stop using kvec
ploop: Kill dead check
ploop: Shorten delta_bat_entries
---
drivers/md/dm-ploop-bat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index f55956aab5a7..90ddba88494f 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -369,6 +369,7 @@ int ploop_read_delta_metadata(struct ploop *ploop, struct file *file,
int ret;
size = (PLOOP_MAP_OFFSET + ploop->nr_bat_entries) * sizeof(map_index_t);
+ size = ALIGN(size, PAGE_SIZE); /* file may be open as direct */
*d_hdr = vzalloc(size);
if (!*d_hdr) {
ret = -ENOMEM;
More information about the Devel
mailing list