Skip to content
Snippets Groups Projects
  1. Dec 04, 2018
  2. Dec 03, 2018
  3. Nov 26, 2018
  4. Nov 24, 2018
    • Theodore Ts'o's avatar
      tune2fs: fix false warning that a UUID change will take a long time · 0eeb17d0
      Theodore Ts'o authored
      
      If the file system only has the flex_bg feature enabled (with out the
      metadata_csum feature enabled), it won't take a long time time fix up
      the checksums after changing the UUID.  While it does need to
      recalculate all of the checksums in the block group descriptors, that
      doesn't take a long time.
      
      Also, if the ea_data feature is enabled, changing the UUID will also
      take a long time, and we weren't warning the user about that case.
      
      Fix up the warning message so it doesn't mislead people, and is more
      accurate.
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      0eeb17d0
  5. Nov 22, 2018
    • Theodore Ts'o's avatar
      mk_cmds: don't use explicit pathname for sed · b7bb80dc
      Theodore Ts'o authored
      
      $AWK doesn't use an explicit pathname, and it's perfectly fine to
      assume that awk and sed are in the user's PATH.  The problem with
      using an explicit pathname is that Debian currently allows merged and
      non-merged /usr.  Avoid using an explicit pathname to prevent
      potential problems.
      
      Addresses-Debian-Bug: #914087
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      b7bb80dc
  6. Nov 21, 2018
  7. Nov 19, 2018
  8. Nov 15, 2018
    • Darrick J. Wong's avatar
      e2scrub: fix systemd escaping again · e6a3faa2
      Darrick J. Wong authored
      
      Apparently newer versions of systemd than the one on this author's
      laptop <cough> now complain about lack of (path) escaping in unit
      instance variable contents:
      
       # e2scrub_all
       Scrubbing /home...
       Invalid unit name "e2scrub@/home" was escaped as "e2scrub@-home"
       (maybe you should use systemd-escape?)
       Starting Online ext4 Metadata Check for /home...
      
      So change the escape_path_for_systemd function to escape paths
      unconditionally to make the warning go away.
      
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      e6a3faa2
    • Li Dongyang's avatar
      e2fsck: check xattr 'system.data' before setting inline_data feature · 4a11f499
      Li Dongyang authored
      
      ext2fs_inline_data_size will happy return 0 and set size to
      EXT4_MIN_INLINE_DATA_SIZE even when inode doesn't have
      xattr 'system.data', a corrupted i_flags could make e2fsck
      enable the inline_data on the superblock.
      
      We should only offer to enable inline_data when i_flags is set
      and xattr 'system.data' can be found.
      
      Also use correct prompt for PR_1_INLINE_DATA_FEATURE.
      
      Signed-off-by: default avatarLi Dongyang <dongyangli@ddn.com>
      4a11f499
  9. Oct 21, 2018
    • Theodore Ts'o's avatar
      libext2fs: refactor code which fixes up the checksums in an extent tree · ae9c0f36
      Theodore Ts'o authored
      
      The code to recalculate the checksums in an extent tree (which is
      needed after an inode is relocated so it has a different inode number)
      was duplicated in tune2fs and resize2fs.  In addition, this work could
      be done in a much more efficient way inside lib/ext2fs/extent.c.
      
      This commit creates a new library function which corrects the
      checksums in an inode's extent tree, named: ext2fs_fix_extents_checksums()
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      ae9c0f36
    • Theodore Ts'o's avatar
      Merge branch 'maint' into next · 08699437
      Theodore Ts'o authored
      08699437
    • Theodore Ts'o's avatar
      e4defrag: handle failure to open the file system gracefully · 1dc6d6e3
      Theodore Ts'o authored
      
      If e4defrag is run by root, it will try to open the underlying file
      system for files that it is trying to defrag so it can get the file
      system parameters.  It's currently doing this by searching /etc/mtab.
      This isn't the best way to go about doing things, but we'll leave it
      for now, at least for a maintenance release.  (The better way to do
      things would be to look up the device using the blkid library, but
      that's a more involved change.)
      
      Since the file system parameters isn't strictly speaking necessary
      (after all we get by without them when not running as root), we'll
      allow e4defrag to continue running if we can't find the file system.
      This can happen if /etc/mtab is pointing at /proc/mounts, and the
      kernel can't properly identify the root file system, it is reported as
      "/dev/root".
      
      Addresses-Debian-Bug: #907634
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      1dc6d6e3
  10. Oct 20, 2018
    • Theodore Ts'o's avatar
      tests: move inode and its interior extent tree block · 8d24eeb7
      Theodore Ts'o authored
      
      Add a test case for the bug fixed in 4b303813: "resize2fs: update
      checksums in the extent tree's relocated block"
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      8d24eeb7
    • Theodore Ts'o's avatar
      resize2fs: update checksums in the extent tree's relocated block · 4b303813
      Theodore Ts'o authored
      
      When shrinking an file system, and we need to relocate an inode, the
      checksums in its extent tree must get updated to reflect its new inode
      number.  When doing this, we need to do this *after* we update the
      extent tree to reflect any blocks which need to be relocated due to
      the file system shrink operation.
      
      Otherwise, in the case where only an interior node of the extent tree
      needs to get relocated, and none of the entries in that node need to
      be adjusted, the checksum for that interior node is updated in the old
      copy of that block, and then after the extent tree is updated to use
      the new copy of that interior node, the extent tree is left with an
      invalid checksum.
      
      This is a relatively rare case, since it requires the following
      conditions to be true:
      
      *)  The metadata checksum feature must be enabled.
      *)  An inode needs to be relocated.
      *)  The inode needs to have an interior node.
      *)  The block for that interior node needs to be relocated.
      *)  None of blocks addressed by entries in that interior node needs
          to be relocated.
      
      When all of these conditions are true, though, the file system is left
      with corrupted with bad checksum for the extent tree block.
      
      Addresses-Launchpad-Bug: 1798562
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Reported-by: default avatarJean-Baptiste Lallement <jean-baptiste.lallement@ubuntu.com>
      4b303813
  11. Oct 16, 2018
  12. Oct 14, 2018
  13. Oct 13, 2018
    • Nick Kralevich's avatar
      AOSP: android/perms.c: clean up error handling · b7343ebb
      Nick Kralevich authored
      There are a number of error conditions which, due to the way
      ext2fs_dir_iterate2 operates, would not be propagated to the upper
      layers of the call stack. As a result, certain error conditions,
      such as not having enough room to allocate blocks for SELinux
      labels, would fail silently, instead of causing a compile
      failure.
      
      As suggested in
      https://android-review.googlesource.com/c/platform/external/e2fsprogs/+/324363
      
      
      , add a error field to the caller's private data structure, and use the
      bit in the field to indicate an error condition. Now, certain errors
      which were silently ignored will cause a compile failure when compiling
      Android.
      
      Test: Artifically modify selabel_lookup() to return a failure, and
            verify Android doesn't compile.
      Test: Verify Android compiles under normal circumstances.
      Test: Artifically modify ino_add_xattr() to return a failure, and
            verify Android doesn't compile.
      Bug: 117502873
      Bug: 117567573
      Bug: 117473440
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      
      Change-Id: Icdb0105a77e98c3428f20d3c59bf824dcad5db8d
      From AOSP commit: 7ca13b8b2953f93536ea09eb2ff19bd7cc85b3c1
      b7343ebb
    • David Anderson's avatar
      AOSP: Fix debugfs clang build. · c4ef5b4f
      David Anderson authored
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      
      Change-Id: Ic4de282039524e1858bbd288e2b85be30d843f40
      From AOSP commit: 7e9e2ca4b08aab41b28e57d0c9b840b8b9e6466d
      c4ef5b4f
    • Jiyong Park's avatar
      AOSP: ODR violation in resize2fs during host build · 48453e96
      Jiyong Park authored
      
      Bug: 112062612
      Test: $ m SANITIZE_HOST=address $OUT_DIR/host/linux-x86/bin/resize2fs $OUT_DIR/host/linux-x86/bin/llvm-symbolizer
            $ $OUT_DIR/host/linux-x86/bin/resize2fs
      
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      
      Change-Id: I72a8c183eb887137e3a414043b3d54771aa4eedc
      From AOSP commit: 9ba4dd69cfbf312c6015d5b007566e2467203f5e
      48453e96
  14. Oct 11, 2018
  15. Oct 04, 2018
Loading