Skip to content

Commit

Permalink
ltop fix to run without MDTs or OSTs
Browse files Browse the repository at this point in the history
commit 6ec5155 did part of the work to allow ltop to run
and show a file system for which only MDTs are running, or
only OSTs are running.  However one code path was overlooked,
and this commit fixes that.

ltop should now report on any file system that has either
working OSTs reporting via lmt, OR has working MDTs reporting
via lmt.

Signed-off-by: Olaf Faaland <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
  • Loading branch information
ofaaland committed Oct 23, 2019
1 parent c895fee commit 0b17b9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/ltop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,7 @@ _rewind_file_to (FILE *f, List time_series, time_t target)
}

/* Peek at the data to find a default file system to monitor.
* Ignore file systems with no OSTs or no MDTs.
* Ignore file systems with no OSTs and no MDTs.
*/
static char *
_find_first_fs (FILE *playf, int stale_secs)
Expand All @@ -2250,7 +2250,7 @@ _find_first_fs (FILE *playf, int stale_secs)

itr = list_iterator_create (fsl);
while (!ret && (f = list_next (itr))) {
if (f->num_ost > 0 && f->num_mdt > 0)
if (f->num_ost > 0 || f->num_mdt > 0)
ret = xstrdup (f->fsname);
}
list_iterator_destroy (itr);
Expand Down

0 comments on commit 0b17b9c

Please sign in to comment.