Whamcloud - gitweb
ChangeLog, fsck.c:
authorTheodore Ts'o <tytso@mit.edu>
Fri, 7 Jul 2000 03:25:13 +0000 (03:25 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 7 Jul 2000 03:25:13 +0000 (03:25 +0000)
  fsck.c (execute, wait_one): Treat fsck.ext3 the same as fsck.ext2
   (because they are the same) for the purposes of the progress bar
   display logic.
ChangeLog, ls.c:
  ls.c (list_super): Display the journal information fields in the
   superblock if the filesystem has a journal.

lib/e2p/ChangeLog
lib/e2p/ls.c
misc/ChangeLog
misc/fsck.c

index bbdb9aa..485b4bc 100644 (file)
@@ -1,3 +1,8 @@
+2000-07-06  Theodore Ts'o  <tytso@valinux.com>
+
+       * ls.c (list_super): Display the journal information fields in the
+               superblock if the filesystem has a journal.
+
 2000-07-04  Theodore Ts'o  <tytso@valinux.com>
 
        * Makefile.in: Remove explicit link of -lc in the shared library.
index 2fb86df..2ab74b3 100644 (file)
@@ -73,7 +73,23 @@ struct ext2fs_sb {
        __u8    s_uuid[16];             /* 128-bit uuid for volume */
        char    s_volume_name[16];      /* volume name */
        char    s_last_mounted[64];     /* directory where last mounted */
-       __u32   s_reserved[206];        /* Padding to the end of the block */
+       __u32   s_algorithm_usage_bitmap; /* For compression */
+       /*
+        * Performance hints.  Directory preallocation should only
+        * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
+        */
+       __u8    s_prealloc_blocks;      /* Nr of blocks to try to preallocate*/
+       __u8    s_prealloc_dir_blocks;  /* Nr to preallocate for dirs */
+       __u16   s_padding1;
+       /* 
+        * Journaling support.
+        */
+       __u8    s_journal_uuid[16];     /* uuid of journal superblock */
+       __u32   s_journal_inum;         /* inode number of journal file */
+       __u32   s_journal_dev;          /* device number of journal file */
+       __u32   s_last_orphan;          /* start of list of inodes to delete */
+       
+       __u32   s_reserved[197];        /* Padding to the end of the block */
 };
 
 #ifndef EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER
@@ -264,18 +280,24 @@ void list_super (struct ext2_super_block * s)
                next = s->s_lastcheck + s->s_checkinterval;
                printf("Next check after:         %s", ctime(&next));
        }
-#ifdef EXT2_DEF_RESUID
        printf("Reserved blocks uid:      ");
        print_user(s->s_def_resuid);
        printf("Reserved blocks gid:      ");
        print_group(s->s_def_resgid);
-#endif
-#ifdef EXT2_DYNAMIC_REV
        if (s->s_rev_level >= EXT2_DYNAMIC_REV) {
                printf("First inode:              %d\n", s->s_first_ino);
                printf("Inode size:               %d\n", s->s_inode_size);
        }
-#endif
+       if (s->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) {
+               if (e2p_is_null_uuid(sb->s_journal_uuid)) {
+                       strcpy(buf, "<none>");
+               } else
+                       e2p_uuid_to_str(sb->s_uuid, buf);
+               printf("Journal UUID:             %s\n", buf);
+               printf("Journal inode:            %u\n", s->s_journal_inum);
+               printf("Journal device:           %x\n", s->s_journal_dev);
+               printf("Orphaned inode list:      %u\n", s->s_last_orphan);
+       }
 }
 
 
index 3400404..c60a656 100644 (file)
@@ -1,5 +1,9 @@
 2000-07-06  Theodore Ts'o  <tytso@valinux.com>
 
+       * fsck.c (execute, wait_one): Treat fsck.ext3 the same as
+               fsck.ext2 (because they are the same) for the purposes of
+               the progress bar display logic.
+
        * tune2fs.8.in: Update manual page to document what happens if
                max_mount_count is negative.
 
index 8270675..229c750 100644 (file)
@@ -74,6 +74,7 @@ static const char *ignored_types[] = {
 static const char *really_wanted[] = {
        "minix",
        "ext2",
+       "ext3",
        "xiafs",
        NULL
 };
@@ -357,6 +358,8 @@ static struct fs_info *lookup(char *filesys)
                    !strcmp(filesys, fs->mountpt))
                        break;
        }
+       if (fs && strchr(fs->device, '='))
+               fs->device = interpret_device(fs->device);
 
        if (fs || !try_again)
                return fs;
@@ -429,7 +432,8 @@ static int execute(const char *type, char *device, char *mntpt,
                argv[argc++] = string_copy(args[i]);
 
        if (progress & !progress_active()) {
-               if (strcmp(type, "ext2") == 0) {
+               if ((strcmp(type, "ext2") == 0) ||
+                   (strcmp(type, "ext3") == 0)) {
                        argv[argc++] = string_copy("-C0");
                        inst->flags |= FLAG_PROGRESS;
                }
@@ -564,7 +568,8 @@ static struct fsck_instance *wait_one(NOARGS)
                for (inst2 = instance_list; inst2; inst2 = inst2->next) {
                        if (inst2->flags & FLAG_DONE)
                                continue;
-                       if (strcmp(inst2->type, "ext2"))
+                       if (strcmp(inst2->type, "ext2") &&
+                           strcmp(inst2->type, "ext3"))
                                continue;
                        /*
                         * If we've just started the fsck, wait a tiny