• Home
  • Raw
  • Download

Lines Matching refs:sb

224 void list_super2(struct ext2_super_block * sb, FILE *f)  in list_super2()  argument
231 inode_blocks_per_group = (((sb->s_inodes_per_group * in list_super2()
232 EXT2_INODE_SIZE(sb)) + in list_super2()
233 EXT2_BLOCK_SIZE(sb) - 1) / in list_super2()
234 EXT2_BLOCK_SIZE(sb)); in list_super2()
235 if (sb->s_volume_name[0]) { in list_super2()
237 strncpy(buf, sb->s_volume_name, sizeof(sb->s_volume_name)); in list_super2()
241 if (sb->s_last_mounted[0]) { in list_super2()
243 strncpy(buf, sb->s_last_mounted, sizeof(sb->s_last_mounted)); in list_super2()
247 fprintf(f, "Filesystem UUID: %s\n", e2p_uuid2str(sb->s_uuid)); in list_super2()
248 fprintf(f, "Filesystem magic number: 0x%04X\n", sb->s_magic); in list_super2()
249 fprintf(f, "Filesystem revision #: %d", sb->s_rev_level); in list_super2()
250 if (sb->s_rev_level == EXT2_GOOD_OLD_REV) { in list_super2()
253 } else if (sb->s_rev_level == EXT2_DYNAMIC_REV) { in list_super2()
258 print_features(sb, f); in list_super2()
259 print_super_flags(sb, f); in list_super2()
260 print_mntopts(sb, f); in list_super2()
261 if (sb->s_mount_opts[0]) in list_super2()
262 fprintf(f, "Mount options: %s\n", sb->s_mount_opts); in list_super2()
264 print_fs_state (f, sb->s_state); in list_super2()
267 print_fs_errors(f, sb->s_errors); in list_super2()
269 str = e2p_os2string(sb->s_creator_os); in list_super2()
272 fprintf(f, "Inode count: %u\n", sb->s_inodes_count); in list_super2()
273 fprintf(f, "Block count: %llu\n", e2p_blocks_count(sb)); in list_super2()
274 fprintf(f, "Reserved block count: %llu\n", e2p_r_blocks_count(sb)); in list_super2()
275 if (sb->s_overhead_blocks) in list_super2()
277 sb->s_overhead_blocks); in list_super2()
278 fprintf(f, "Free blocks: %llu\n", e2p_free_blocks_count(sb)); in list_super2()
279 fprintf(f, "Free inodes: %u\n", sb->s_free_inodes_count); in list_super2()
280 fprintf(f, "First block: %u\n", sb->s_first_data_block); in list_super2()
281 fprintf(f, "Block size: %u\n", EXT2_BLOCK_SIZE(sb)); in list_super2()
282 if (ext2fs_has_feature_bigalloc(sb)) in list_super2()
284 EXT2_CLUSTER_SIZE(sb)); in list_super2()
287 EXT2_CLUSTER_SIZE(sb)); in list_super2()
288 if (ext2fs_has_feature_64bit(sb)) in list_super2()
289 fprintf(f, "Group descriptor size: %u\n", sb->s_desc_size); in list_super2()
290 if (sb->s_reserved_gdt_blocks) in list_super2()
292 sb->s_reserved_gdt_blocks); in list_super2()
293 fprintf(f, "Blocks per group: %u\n", sb->s_blocks_per_group); in list_super2()
294 if (ext2fs_has_feature_bigalloc(sb)) in list_super2()
296 sb->s_clusters_per_group); in list_super2()
299 sb->s_clusters_per_group); in list_super2()
300 fprintf(f, "Inodes per group: %u\n", sb->s_inodes_per_group); in list_super2()
302 if (sb->s_raid_stride) in list_super2()
304 sb->s_raid_stride); in list_super2()
305 if (sb->s_raid_stripe_width) in list_super2()
307 sb->s_raid_stripe_width); in list_super2()
308 if (sb->s_first_meta_bg) in list_super2()
310 sb->s_first_meta_bg); in list_super2()
311 if (sb->s_log_groups_per_flex) in list_super2()
313 1 << sb->s_log_groups_per_flex); in list_super2()
314 if (sb->s_mkfs_time) { in list_super2()
315 tm = sb->s_mkfs_time; in list_super2()
318 tm = sb->s_mtime; in list_super2()
320 sb->s_mtime ? ctime(&tm) : "n/a\n"); in list_super2()
321 tm = sb->s_wtime; in list_super2()
323 fprintf(f, "Mount count: %u\n", sb->s_mnt_count); in list_super2()
324 fprintf(f, "Maximum mount count: %d\n", sb->s_max_mnt_count); in list_super2()
325 tm = sb->s_lastcheck; in list_super2()
327 fprintf(f, "Check interval: %u (%s)\n", sb->s_checkinterval, in list_super2()
328 interval_string(sb->s_checkinterval)); in list_super2()
329 if (sb->s_checkinterval) in list_super2()
333 next = sb->s_lastcheck + sb->s_checkinterval; in list_super2()
337 if (sb->s_kbytes_written) { in list_super2()
339 if (sb->s_kbytes_written < POW2(13)) in list_super2()
340 fprintf(f, "%llu kB\n", sb->s_kbytes_written); in list_super2()
341 else if (sb->s_kbytes_written < POW2(23)) in list_super2()
343 (sb->s_kbytes_written + POW2(9)) >> 10); in list_super2()
344 else if (sb->s_kbytes_written < POW2(33)) in list_super2()
346 (sb->s_kbytes_written + POW2(19)) >> 20); in list_super2()
347 else if (sb->s_kbytes_written < POW2(43)) in list_super2()
349 (sb->s_kbytes_written + POW2(29)) >> 30); in list_super2()
352 (sb->s_kbytes_written + POW2(39)) >> 40); in list_super2()
355 print_user(sb->s_def_resuid, f); in list_super2()
357 print_group(sb->s_def_resgid, f); in list_super2()
358 if (sb->s_rev_level >= EXT2_DYNAMIC_REV) { in list_super2()
359 fprintf(f, "First inode: %d\n", sb->s_first_ino); in list_super2()
360 fprintf(f, "Inode size: %d\n", sb->s_inode_size); in list_super2()
361 if (sb->s_min_extra_isize) in list_super2()
363 sb->s_min_extra_isize); in list_super2()
364 if (sb->s_want_extra_isize) in list_super2()
366 sb->s_want_extra_isize); in list_super2()
368 if (!e2p_is_null_uuid(sb->s_journal_uuid)) in list_super2()
370 e2p_uuid2str(sb->s_journal_uuid)); in list_super2()
371 if (sb->s_journal_inum) in list_super2()
373 sb->s_journal_inum); in list_super2()
374 if (sb->s_journal_dev) in list_super2()
376 sb->s_journal_dev); in list_super2()
377 if (sb->s_last_orphan) in list_super2()
379 sb->s_last_orphan); in list_super2()
380 if (ext2fs_has_feature_dir_index(sb) || in list_super2()
381 sb->s_def_hash_version) in list_super2()
383 e2p_hash2string(sb->s_def_hash_version)); in list_super2()
384 if (!e2p_is_null_uuid(sb->s_hash_seed)) in list_super2()
386 e2p_uuid2str(sb->s_hash_seed)); in list_super2()
387 if (sb->s_jnl_backup_type) { in list_super2()
389 switch (sb->s_jnl_backup_type) { in list_super2()
394 fprintf(f, "type %u\n", sb->s_jnl_backup_type); in list_super2()
397 if (sb->s_backup_bgs[0] || sb->s_backup_bgs[1]) { in list_super2()
399 if (sb->s_backup_bgs[0]) in list_super2()
400 fprintf(f, "%u ", sb->s_backup_bgs[0]); in list_super2()
401 if (sb->s_backup_bgs[1]) in list_super2()
402 fprintf(f, "%u ", sb->s_backup_bgs[1]); in list_super2()
405 if (sb->s_snapshot_inum) { in list_super2()
407 sb->s_snapshot_inum); in list_super2()
409 sb->s_snapshot_id); in list_super2()
411 sb->s_snapshot_r_blocks_count); in list_super2()
413 if (sb->s_snapshot_list) in list_super2()
415 sb->s_snapshot_list); in list_super2()
416 if (sb->s_error_count) in list_super2()
418 sb->s_error_count); in list_super2()
419 if (sb->s_first_error_time) { in list_super2()
420 tm = sb->s_first_error_time; in list_super2()
423 strncpy(buf, (char *)sb->s_first_error_func, in list_super2()
424 sizeof(sb->s_first_error_func)); in list_super2()
427 sb->s_first_error_line); in list_super2()
429 sb->s_first_error_ino); in list_super2()
431 sb->s_first_error_block); in list_super2()
433 if (sb->s_last_error_time) { in list_super2()
434 tm = sb->s_last_error_time; in list_super2()
437 strncpy(buf, (char *)sb->s_last_error_func, in list_super2()
438 sizeof(sb->s_last_error_func)); in list_super2()
441 sb->s_last_error_line); in list_super2()
443 sb->s_last_error_ino); in list_super2()
445 sb->s_last_error_block); in list_super2()
447 if (ext2fs_has_feature_mmp(sb)) { in list_super2()
449 (long long)sb->s_mmp_block); in list_super2()
451 sb->s_mmp_update_interval); in list_super2()
454 if (*quota_sb_inump(sb, qtype) != 0) in list_super2()
457 *quota_sb_inump(sb, qtype)); in list_super2()
460 if (ext2fs_has_feature_metadata_csum(sb)) { in list_super2()
462 checksum_type(sb->s_checksum_type)); in list_super2()
464 sb->s_checksum); in list_super2()
466 if (!e2p_is_null_uuid(sb->s_encrypt_pw_salt)) in list_super2()
468 e2p_uuid2str(sb->s_encrypt_pw_salt)); in list_super2()
470 if (ext2fs_has_feature_csum_seed(sb)) in list_super2()
472 sb->s_checksum_seed); in list_super2()
473 if (ext2fs_has_feature_casefold(sb)) in list_super2()
475 e2p_encoding2str(sb->s_encoding)); in list_super2()