[Devel] [PATCH RHEL8 COMMIT] ploop: Mask as PF_IO_THREAD
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jun 15 19:27:54 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.43
------>
commit 8e0fcffa21e16820b38548333927d87d1f8a6368
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue Jun 15 19:27:54 2021 +0300
ploop: Mask as PF_IO_THREAD
Instead of to port ce614bb81377 "ploop: check ENOSPC callback"
and e5a3cf36977e "ext4/ploop: ask ploop about ENOSPC condition",
simplify them via this patch, which will use ext4 generic space
checker. This prevents it to use fs root reserves.
https://jira.sw.ru/browse/PSBM-127225
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 37d6fe3c94b9..a89164ed3736 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1621,6 +1621,9 @@ void do_ploop_work(struct work_struct *ws)
struct ploop_index_wb piwb;
LIST_HEAD(deferred_pios);
LIST_HEAD(discard_pios);
+ unsigned int pf_io_thread = (current->flags & PF_IO_THREAD);
+
+ current->flags |= PF_IO_THREAD;
/*
* In piwb we collect inquires of indexes updates, which are
@@ -1652,6 +1655,8 @@ void do_ploop_work(struct work_struct *ws)
}
check_services_timeout(ploop);
+
+ current->flags = (current->flags & ~PF_IO_THREAD) | pf_io_thread;
}
void do_ploop_fsync_work(struct work_struct *ws)
More information about the Devel
mailing list