[Devel] [PATCH RHEL9 COMMIT] ploop: Provide more info about ENOSPC

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 26 19:58:45 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.17
------>
commit 8ee13d4719f7edd25c5eb2eecf917acf10cda26b
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Tue Oct 26 19:58:44 2021 +0300

    ploop: Provide more info about ENOSPC
    
    Add info to status and print to dmesg once.
    
    https://jira.sw.ru/browse/PSBM-135007
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c    | 1 +
 drivers/md/dm-ploop-target.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 03c9e216cc1f..a558445a1bec 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -169,6 +169,7 @@ static bool ploop_try_delay_enospc(struct ploop_rq *prq, struct pio *pio)
 
 	init_prq_and_embedded_pio(ploop, prq->rq, prq, pio);
 
+	pr_err_once("ploop: underlying disk is almost full\n");
 	ploop->event_enospc = true;
 	list_add_tail(&pio->list, &ploop->enospc_pios);
 unlock:
diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index 327095f75359..bd68d5fb272b 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -455,6 +455,8 @@ static void ploop_status(struct dm_target *ti, status_type_t type,
 		p += sprintf(p, "t");
 	if (READ_ONCE(ploop->noresume))
 		p += sprintf(p, "n");
+	if (READ_ONCE(ploop->event_enospc))
+		p += sprintf(p, "s");
 	if (p == stat)
 		p += sprintf(p, "o");
 	if (ploop->skip_off)


More information about the Devel mailing list