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 <[email protected]> --- 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) _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
