Skip to content

Commit c09dba2

Browse files
committed
aggregator: hide the aggregator node in readdir
Skip the aggregator file from the fuse_readdir() output. The file will not be discoverable by grep -r, find, glob etc. thus preventing confusion from duplicated contents from the aggregator and from normal stats. Direct aggregator file access by name will still work. Issue: LBM1-15406 Signed-off-by: Anton Eidelman <anton@lightbitslabs.com>
1 parent 1821744 commit c09dba2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/procstat.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ static void fuse_readdir(fuse_req_t req, fuse_ino_t ino, size_t size, off_t off,
380380

381381
if (!item_registered(iter))
382382
continue;
383+
if (iter->flags & STATS_ENTRY_FLAG_AGGREGATOR)
384+
continue;
383385
memset(&stat, 0, sizeof(stat));
384386
fname = procstat_item_name(iter);
385387
fill_item_stats(context, iter, &stat);

0 commit comments

Comments
 (0)