Whamcloud - gitweb
Merge branch 'maint' into next
authorTheodore Ts'o <tytso@mit.edu>
Sat, 25 Sep 2010 02:40:21 +0000 (22:40 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 25 Sep 2010 02:40:21 +0000 (22:40 -0400)
Conflicts:
configure
configure.in
lib/ext2fs/ext2fs.h
misc/mke2fs.c

17 files changed:
1  2 
configure
configure.in
debugfs/debugfs.8.in
debugfs/debugfs.c
debugfs/set_fields.c
e2fsck/unix.c
lib/e2p/ls.c
lib/ext2fs/closefs.c
lib/ext2fs/ext2_fs.h
lib/ext2fs/ext2_io.h
lib/ext2fs/ext2fs.h
lib/ext2fs/inode.c
lib/ext2fs/openfs.c
lib/ext2fs/rw_bitmaps.c
misc/badblocks.c
misc/mke2fs.c
misc/tune2fs.c

diff --cc configure
+++ b/configure
@@@ -10647,7 -10699,7 +10699,7 @@@ if test "$ac_res" != no; then 
  fi
  
  fi
- for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology
 -for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology mbstowcs
++for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology mbstowcs
  do :
    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --cc configure.in
@@@ -853,7 -853,7 +853,7 @@@ if test -n "$BLKID_CMT"; the
    AC_SEARCH_LIBS([blkid_probe_all], [blkid])
  fi
  dnl
- AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology)
 -AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology mbstowcs)
++AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate blkid_probe_get_topology mbstowcs)
  dnl
  dnl Check to see if -lsocket is required (solaris) to make something
  dnl that uses socket() to compile; this is needed for the UUID library
Simple merge
Simple merge
Simple merge
diff --cc e2fsck/unix.c
Simple merge
diff --cc lib/e2p/ls.c
Simple merge
@@@ -193,8 -145,9 +193,9 @@@ static errcode_t write_primary_superblo
        errcode_t       retval;
  
        if (!fs->io->manager->write_byte || !fs->orig_super) {
+       fallback:
                io_channel_set_blksize(fs->io, SUPERBLOCK_OFFSET);
 -              retval = io_channel_write_blk(fs->io, 1, -SUPERBLOCK_SIZE,
 +              retval = io_channel_write_blk64(fs->io, 1, -SUPERBLOCK_SIZE,
                                              super);
                io_channel_set_blksize(fs->io, fs->blocksize);
                return retval;
Simple merge
Simple merge
@@@ -180,8 -173,7 +181,9 @@@ typedef struct ext2_file *ext2_file_t
  #define EXT2_FLAG_EXCLUSIVE           0x4000
  #define EXT2_FLAG_SOFTSUPP_FEATURES   0x8000
  #define EXT2_FLAG_NOFREE_ON_ERROR     0x10000
 +#define EXT2_FLAG_64BITS              0x20000
 +#define EXT2_FLAG_PRINT_PROGRESS      0x40000
+ #define EXT2_FLAG_DIRECT_IO           0x80000
  
  /*
   * Special flag in the ext2 inode i_flag field that means that this is
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc misc/mke2fs.c
@@@ -300,22 -297,77 +300,22 @@@ _("Warning: the backup superblock/grou
        ext2fs_badblocks_list_iterate_end(bb_iter);
  }
  
- static void write_inode_tables(ext2_filsys fs, int lazy_flag)
 -/*
 - * These functions implement a generalized progress meter.
 - */
 -struct progress_struct {
 -      char            format[20];
 -      char            backup[80];
 -      __u32           max;
 -      int             skip_progress;
 -};
 -
 -static void progress_init(struct progress_struct *progress,
 -                        const char *label,__u32 max)
 -{
 -      int     i;
 -
 -      memset(progress, 0, sizeof(struct progress_struct));
 -      if (quiet)
 -              return;
 -
 -      /*
 -       * Figure out how many digits we need
 -       */
 -      i = int_log10(max);
 -      sprintf(progress->format, "%%%dd/%%%dld", i, i);
 -      memset(progress->backup, '\b', sizeof(progress->backup)-1);
 -      progress->backup[sizeof(progress->backup)-1] = 0;
 -      if ((2*i)+1 < (int) sizeof(progress->backup))
 -              progress->backup[(2*i)+1] = 0;
 -      progress->max = max;
 -
 -      progress->skip_progress = 0;
 -      if (getenv("MKE2FS_SKIP_PROGRESS"))
 -              progress->skip_progress++;
 -
 -      fputs(label, stdout);
 -      fflush(stdout);
 -}
 -
 -static void progress_update(struct progress_struct *progress, __u32 val)
 -{
 -      if ((progress->format[0] == 0) || progress->skip_progress)
 -              return;
 -      printf(progress->format, val, progress->max);
 -      fputs(progress->backup, stdout);
 -}
 -
 -static void progress_close(struct progress_struct *progress)
 -{
 -      if (progress->format[0] == 0)
 -              return;
 -      fputs(_("done                            \n"), stdout);
 -}
 -
+ static void write_inode_tables(ext2_filsys fs, int lazy_flag, int itable_zeroed)
  {
        errcode_t       retval;
 -      blk_t           blk;
 +      blk64_t         blk;
        dgrp_t          i;
        int             num, ipb;
 -      struct progress_struct progress;
 +      struct ext2fs_numeric_progress_struct progress;
  
 -      if (quiet)
 -              memset(&progress, 0, sizeof(progress));
 -      else
 -              progress_init(&progress, _("Writing inode tables: "),
 -                            fs->group_desc_count);
 +      ext2fs_numeric_progress_init(fs, &progress,
 +                                   _("Writing inode tables: "),
 +                                   fs->group_desc_count);
  
        for (i = 0; i < fs->group_desc_count; i++) {
 -              progress_update(&progress, i);
 +              ext2fs_numeric_progress_update(fs, &progress, i);
  
 -              blk = fs->group_desc[i].bg_inode_table;
 +              blk = ext2fs_inode_table_loc(fs, i);
                num = fs->inode_blocks_per_group;
  
                if (lazy_flag) {
                                 EXT2_INODE_SIZE(fs->super)) +
                                EXT2_BLOCK_SIZE(fs->super) - 1) /
                               EXT2_BLOCK_SIZE(fs->super));
-               } else {
+               }
+               if (!lazy_flag || itable_zeroed) {
                        /* The kernel doesn't need to zero the itable blocks */
 -                      fs->group_desc[i].bg_flags |= EXT2_BG_INODE_ZEROED;
 +                      ext2fs_bg_flags_set(fs, i, EXT2_BG_INODE_ZEROED);
                        ext2fs_group_desc_csum_set(fs, i);
                }
 -              retval = ext2fs_zero_blocks(fs, blk, num, &blk, &num);
 +              retval = ext2fs_zero_blocks2(fs, blk, num, &blk, &num);
                if (retval) {
                        fprintf(stderr, _("\nCould not write %d "
 -                                "blocks in inode table starting at %u: %s\n"),
 +                                "blocks in inode table starting at %llu: %s\n"),
                                num, blk, error_message(retval));
                        exit(1);
                }
@@@ -1412,11 -1459,12 +1413,12 @@@ static void PRS(int argc, char *argv[]
                        blocksize, sys_page_size);
        }
        if (optind < argc) {
 -              fs_param.s_blocks_count = parse_num_blocks(argv[optind++],
 -                              fs_param.s_log_block_size);
 -              if (!fs_param.s_blocks_count) {
 +              fs_blocks_count = parse_num_blocks2(argv[optind++],
 +                                                 fs_param.s_log_block_size);
 +              if (!fs_blocks_count) {
-                       com_err(program_name, 0, _("invalid blocks count - %s"),
-                               argv[optind - 1]);
+                       com_err(program_name, 0,
 -                              _("invalid blocks count '%s' on device '%s'"),
++                              _("invalid blocks '%s' on device '%s'"),
+                               argv[optind - 1], device_name);
                        exit(1);
                }
        }
@@@ -2144,10 -2201,10 +2176,10 @@@ int main (int argc, char *argv[]
  
                if (retval) {
                        com_err(program_name, retval,
 -                              _("while zeroing block %u at end of filesystem"),
 +                              _("while zeroing block %llu at end of filesystem"),
                                ret_blk);
                }
-               write_inode_tables(fs, lazy_itable_init);
+               write_inode_tables(fs, lazy_itable_init, itable_zeroed);
                create_root_dir(fs);
                create_lost_and_found(fs);
                reserve_inodes(fs);
diff --cc misc/tune2fs.c
Simple merge