1. 29 Dec, 2013 3 commits
  2. 28 Dec, 2013 6 commits
  3. 27 Dec, 2013 3 commits
  4. 26 Dec, 2013 11 commits
  5. 25 Dec, 2013 9 commits
    • Phillip Susi's avatar
      e2image: add offset switches · 6b5535f4
      Phillip Susi authored
      
      Add -o and -O switches to specify the offset where the source
      and destination filesystems start.  This is useful if you have
      an image of a partitioned disk or wish to create one.
      Signed-off-by: default avatarPhillip Susi <psusi@ubuntu.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      6b5535f4
    • Theodore Ts'o's avatar
      libext2fs: checksum bg descriptors larger than 64 bytes · b3c2a638
      Theodore Ts'o authored
      
      Currently the ext4 block group descriptor is 64 bytes.  In case we
      need to support larger block group descriptors in the future, teach
      ext2fs_group_desc_csum() to checksum parts of the block group
      descriptors that libext2fs doesn't yet understand.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      b3c2a638
    • Theodore Ts'o's avatar
      tests: use the in-tree binaries in the test f_extent_oobounds · aafd3615
      Theodore Ts'o authored
      
      Fix the f_extent_oobounds test so that it uses binaries built in the
      tree, instead of the binaries in the system PATH (which might not
      exist in a chroot environment) when creating the test image.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      aafd3615
    • Theodore Ts'o's avatar
      debugfs: fix extent header in do_write for big-endian machines · 45f143c2
      Theodore Ts'o authored
      Commit a17e9f30
      
       set up the extent header for a new file.
      Unfortunately it didn't correctly handle byte swapping; fix this so
      the regression tests pass on PowerPC systems.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: Eric Sandeen <sandeen@redhat.com>
      45f143c2
    • Theodore Ts'o's avatar
    • Eric Whitney's avatar
      debugfs: silence build warning and remove incorrect error message · 32541fe4
      Eric Whitney authored
      Commit fe56188b
      
       modified the code used to check the block number
      argument to the command line -s switch, adding a call to com_err().
      This causes a compile time warning because the third argument to
      com_err() isn't a string.  Also, when the block number argument is
      bad it outputs an incorrect error message - "Operation not permitted".
      
      Fix these minor problems by removing the call to com_err().  Other
      code provides enough error reporting information in this case.
      Signed-off-by: default avatarEric Whitney <enwlinux@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      32541fe4
    • Eric Whitney's avatar
      e2fsck: fix printf conversion specs in ea_refcount.c · a8263cab
      Eric Whitney authored
      Commit 130e961a
      
       changed the type
      used to represent block numbers in ea_refcount.c from blk_t to blk64_t
      to add support for 64 bit extended attribute refcounting.  We also
      need to adjust printf conversion specs that now don't match their new
      blk64_t arguments.  This will silence compiler warnings seen when
      "make check" is run and will avoid truncation of printed values.
      Signed-off-by: default avatarEric Whitney <enwlinux@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      a8263cab
    • Andreas Dilger's avatar
      mke2fs: further updates for mke2fs(8) man page · b769aaec
      Andreas Dilger authored
      The mke2fs(8) man page was updated in 4727c67d
      
      , but needs some
      more clear descriptions for extra_isize and metadta_csum features.
      The uninit_bg feature is supported by all ext4-capable kernels,
      and does have a slow e2fsck pass for newly-formatted filesystems,
      so remove the caveat.
      Signed-off-by: default avatarAndreas Dilger <adilger@dilger.ca>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      b769aaec
    • Andreas Dilger's avatar
      debugfs, e2fsck: fix s_desc_size handling · 2bc30417
      Andreas Dilger authored
      
      The s_desc_size in the superblock specifies the group descriptor
      size in bytes, but in various places the EXT4_FEATURE_INCOMPAT_64BIT
      flag implies that the descriptor size is EXT2_MIN_DESC_SIZE_64BIT
      (64 bytes) instead of checking the actual size.  In other places,
      the s_desc_size field is used without checking for INCOMPAT_64BIT.
      
      In the case of ext2fs_group_desc() the s_desc_size was being ignored,
      and assumed to be sizeof(struct ext4_group_desc), which would result
      in garbage for any but the first group descriptor.  Similarly, in
      ext2fs_group_desc_csum() and print_csum() they assumed that the
      maximum group descriptor size was sizeof(struct ext4_group_desc).
      Fix these functions to use the actual superblock s_desc_size if
      INCOMPAT_64BIT.
      
      Conversely, in ext2fs_swap_group_desc2() s_desc_size was used
      without checking for INCOMPAT_64BIT being set.
      
      The e2fsprogs behaviour is different than that of the kernel,
      which always checks INCOMPAT_64BIT, and only uses s_desc_size to
      determine the offset of group descriptors and what range of bytes
      to checksum.
      
      Allow specifying the s_desc_size field at mke2fs time with the
      "-E desc_size=NNN" option.  Allow a power-of-two s_desc_size
      value up to s_blocksize if INCOMPAT_64BIT is specified.  This
      is not expected to be used by regular users at this time, so it
      is not currently documented in the mke2fs usage or man page.
      
      Add m_desc_size_128, f_desc_size_128, and f_desc_bad test cases to
      verify mke2fs and e2fsck handling of larger group descriptor sizes.
      Signed-off-by: default avatarAndreas Dilger <adilger@dilger.ca>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      2bc30417
  6. 23 Dec, 2013 2 commits
    • Andreas Dilger's avatar
      e2fsck: verify s_desc_size is power-of-two value · 11d1116a
      Andreas Dilger authored
      
      Add a LOG2_CHECK mode for check_super_value() so that it is easy
      to verify values that are supposed to be power-of-two values
      (s_desc_size and s_inode_size so far).  In ext2fs_check_desc()
      also check for a power-of-two s_desc_size.
      
      Print out s_desc_size in debugfs "stats" and dumpe2fs output, if
      it is non-zero.
      
      It turns out that the s_desc_size validation in check_super_block()
      is not currently used by e2fsck, because the group descriptors are
      verified earlier by ext2fs_check_desc(), and even without an
      explicit check of s_desc_size the group descriptors fail to align
      correctly on disk.  It makes sense to keep the check_super_block()
      regardless, in case the code changes at some point in the future.
      Signed-off-by: default avatarAndreas Dilger <adilger@dilger.ca>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      11d1116a
    • Andreas Dilger's avatar
      tests: delete temporary resize test files · fd5e00e1
      Andreas Dilger authored
      Since commit 5ad07aca
      
       if $TMP cannot hold large test filesystems
      for resize testing the resize_test creates temporary test files
      in the local working directory.  Since it overrides TMPFILE locally
      the calling program does not delete the generated file correctly.
      
      Delete the large $TMPFILE within resize_test if it passes, but leave
      it for debugging if the test failed.
      Signed-off-by: default avatarAndreas Dilger <adilger@dilger.ca>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      fd5e00e1
  7. 19 Dec, 2013 1 commit
    • Johan Erlandsson's avatar
      e2fsck: read only parameter incorrectly compared · e9a8c0c2
      Johan Erlandsson authored
      
      Don't check for lost+found in read only mode.
      
      [Note: this patch was originally made against 1.41.14 version of
      e2fsprogs found as part of the AOSP (Android Open Source Program)
      tree.  My Signed-off-by relies on the fact that the original patch
      author would have had to have filed a contribution agreement with Open
      Handset Alliance before this commit before this commit was allowed
      into the AOSP tree. -- tytso]
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      e9a8c0c2
  8. 16 Dec, 2013 5 commits