From: Neeraj Pratap Singh Date: Tue, 21 Feb 2023 10:10:13 +0000 (+0530) Subject: cephfs-top: Handle `METRIC_TYPE_NONE` fields for sorting X-Git-Tag: v16.2.13~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=80a20916c76df1f501df1acaefb32321522a905c;p=ceph.git cephfs-top: Handle `METRIC_TYPE_NONE` fields for sorting Currently, the sort feature in cephfs-top isn't applicable to the fields which are of type `METRIC_TYPE_NONE` , named as 'ofiles', 'oicaps' and 'oinodes'. This commit will make the cephfs-top sort feature to support the above mentioned fields too. From this commit onwards, all the current fields displayed in cephfs-top can be used for sorting. Fixes: https://tracker.ceph.com/issues/58814 Signed-off-by: Neeraj Pratap Singh (cherry picked from commit 4626cb5fb1141c38acd4b114ad4562bd14fa7aad) Conflicts: src/tools/cephfs/top/cephfs-top:Removed the changes that are not backported to pacific.Changes of this #48664 which were conflicting the changes done in this PR --- diff --git a/src/tools/cephfs/top/cephfs-top b/src/tools/cephfs/top/cephfs-top index 7104d9a4414..aaf1882d963 100755 --- a/src/tools/cephfs/top/cephfs-top +++ b/src/tools/cephfs/top/cephfs-top @@ -734,6 +734,7 @@ class FSTop(object): f'{speed}', curses.A_DIM) else: # display 0th element from metric tuple + metrics_dict[fs_name][client_id][self.items(item)] = m[0] self.fsstats.addstr(y_coord, coord[0], f'{m[0]}', curses.A_DIM) else: self.fsstats.addstr(y_coord, coord[0], "N/A", curses.A_DIM)