Whamcloud - gitweb
LU-16555 obdclass: quote jobid with ':' char 50/50150/3
authorLei Feng <flei@whamcloud.com>
Tue, 28 Feb 2023 01:38:22 +0000 (09:38 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Mar 2023 03:29:18 +0000 (03:29 +0000)
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
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50150
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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 = "\"";
                }
        }