| 1257 | } |
| 1258 | |
| 1259 | void |
| 1260 | Check_Freelist(const std::string &devicePath) |
| 1261 | { |
| 1262 | Cache cache; |
| 1263 | if ((err = cache.loadSpan(SpanFile))) { |
| 1264 | cache.dumpSpans(Cache::SpanDumpDepth::SPAN); |
| 1265 | for (auto sp : cache._spans) { |
| 1266 | if (devicePath.size() > 0 && sp->_path.view() == devicePath) { |
| 1267 | printf("Scanning %s\n", devicePath.data()); |
| 1268 | for (auto strp : sp->_stripes) { |
| 1269 | strp->loadMeta(); |
| 1270 | strp->loadDir(); |
| 1271 | for (int s = 0; s < strp->_segments; s++) { |
| 1272 | strp->check_loop(s); |
| 1273 | } |
| 1274 | } |
| 1275 | break; |
| 1276 | } |
| 1277 | } |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | void |
| 1282 | Init_disk(swoc::file::path const &input_file_path) |