[Devel] [PATCH RH8] ploop: Provide more info about ENOSPC
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Oct 20 18:13:01 MSK 2021
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 79142acddecc..4cadf6e45b4d 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