device: dumpstate: expand f2fs dump script
With the recent changes in partition mapping, multiple f2fs partitions
exists and is not fixed to specific dm-x. To address this, update the
script to dynamically locate f2fs partitions.
New log:
------ F2FS - fragmentation (/vendor/bin/sh -c for d in $(ls /proc/fs/f2fs/); ...
dm-4: /dev/block/mapper/scratch -> /dev/block/dm-4
format: segment_type|valid_blocks
segment_type(0:HD, 1:WD, 2:CD, 3:HN, 4:WN, 5:CN)
0 3|18 4|2 5|0 0|1 0|0 0|0 0|0 0|0 0|0 0|0
10 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0 0|0
...
dm-5: /dev/block/mapper/userdata -> /dev/block/dm-5
format: segment_type|valid_blocks
segment_type(0:HD, 1:WD, 2:CD, 3:HN, 4:WN, 5:CN)
0 3|330 0|147 5|5 0|68 0|32 0|77 4|112 3|13 0|42 0|75
10 4|30 3|69 0|98 0|45 0|56 0|128 0|185 0|36 0|104 3|84
...
Bug: 137150088
Test: run bugreport and check f2fs dump
Change-Id: I5546f35f543628282a58dae38a72a379d5e56b0b
Signed-off-by: Leo Liou <leoliou@google.com>
1 file changed