[Devel] [PATCH RHEL8 COMMIT] ploop: Fixup flush
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 17 19:04:58 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.30
------>
commit d96267c1f1250673dd284120f4ffec16964489d9
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon May 17 19:04:57 2021 +0300
ploop: Fixup flush
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
=====================
Patchset description:
dm-ploop: Kill loop
Intermediate patches can't be base for bisect.
In scope of https://jira.sw.ru/browse/PSBM-123654
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 289114511246..5a5ce5183d8b 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1622,16 +1622,22 @@ void do_ploop_fsync_work(struct work_struct *ws)
{
struct ploop *ploop = container_of(ws, struct ploop, fsync_worker);
LIST_HEAD(flush_pios);
+ struct file *file;
struct pio *pio;
+ int ret;
spin_lock_irq(&ploop->deferred_lock);
list_splice_init(&ploop->flush_pios, &flush_pios);
spin_unlock_irq(&ploop->deferred_lock);
- /* FIXME: issue flush */
+ file = top_delta(ploop)->file;
+ ret = vfs_fsync(file, 0);
- while ((pio = pio_list_pop(&flush_pios)) != NULL)
+ while ((pio = pio_list_pop(&flush_pios)) != NULL) {
+ if (unlikely(ret))
+ pio->bi_status = errno_to_blk_status(ret);
pio_endio(pio);
+ }
}
/*
More information about the Devel
mailing list