Whamcloud - gitweb
LU-16555 obdclass: quote jobid with ':' char 50/50150/2
authorLei Feng <flei@whamcloud.com>
Tue, 28 Feb 2023 01:38:22 +0000 (09:38 +0800)
committerLei Feng <flei@whamcloud.com>
Tue, 28 Feb 2023 01:46:26 +0000 (09:46 +0800)
quote jobid with ':' char even though ':' is printed literally.

Fixes: 12604ac4de (LU-16555 obdclass: print more special chars for jobid)
Test-Parameters: trivial
Signed-off-by: Lei Feng <flei@whamcloud.com>
Change-Id: I8bf642180b00f068921598c3a0ea30b4f5b99c1e

lustre/obdclass/lprocfs_jobstats.c

index ea23327..2173f27 100644 (file)
@@ -462,6 +462,9 @@ static int lprocfs_jobstats_seq_show(struct seq_file *p, void *v)
                        joblen += 3;
                } else {
                        escaped[joblen] = *c;
+                       /* if jobid has ':', it should be quoted too */
+                       if (*c == ':')
+                               quote = "\"";
                }
        }