1. 30 Nov, 2015 11 commits
  2. 16 Nov, 2015 3 commits
    • Andreas Dilger's avatar
      e2fsck: skip quota update when interrupted · db3d8718
      Andreas Dilger authored
      There is a bug in how e2fsck handles being interrupted by CTRL-C.
      If CTRL-C is pressed to kill e2fsck rather than e.g. kill -9, then
      the interrupt handler sets E2F_FLAG_CANCEL in the context but doesn't
      actually kill the process.  Instead, e2fsck_pass1() checks this flag
      before processing the next inode.
      If a filesystem is running in fix mode (e2fsck -fy) is interrupted,
      and the quota feature is enabled, then the quota file will still be
      written to disk even though the inode scan was not complete and the
      quota information is totally inaccurate.  Even worse, if the Pass 1
      inode and block scan was not finished, then the in-memory block
      bitmaps (which are used for block allocation during e2fsck) are also
      invalid, so any blocks allocated to the quota files may corrupt other
      files if those blocks were actually used.
        e2fsck 1.42.13.wc3 (28-Aug-2015)
        Pass 1: Checking inodes, blocks, and sizes
        ^C[QUOTA WARNING] Usage inconsistent for ID 0:
            actual (6455296, 168) != expected (8568832, 231)
        [QUOTA WARNING] Usage inconsistent for ID 695:
            actual (614932320256, 63981) != expected (2102405386240, 176432)
        Update quota info for quota type 0? yes
        [QUOTA WARNING] Usage inconsistent for ID 0:
            actual (6455296, 168) != expected (8568832, 231)
        [QUOTA WARNING] Usage inconsistent for ID 538:
            actual (614932320256, 63981) != expected (2102405386240, 176432)
        Update quota info for quota type 1? yes
        myth-OST0001: e2fsck canceled.
        myth-OST0001: ***** FILE SYSTEM WAS MODIFIED *****
      There may be a desire to flush out modified inodes and such that have
      been repaired, so that restarting an interrupted e2fsck will make
      progress, but the quota file update is plain wrong unless at least
      pass1 has finished, and the journal recreation is also dangerous if
      the block bitmaps have not been fully updated.
      Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    • Darrick J. Wong's avatar
      libext2fs: fix parents when modifying extents · 7dce0c06
      Darrick J. Wong authored
      In ext2fs_extent_set_bmap() and ext2fs_punch_extent(), fix the parents
      when altering either end of an extent so that the parent nodes reflect
      the added mapping.
      There's a slight complication to using fix_parents: if there are two
      mappings to an lblk in the tree, the value of handle->path->curr can
      point to either extent afterwards), which is documented in a comment.
      Some additional color commentary from Darrick:
        In the _set_bmap() case, I noticed that the "remapping last block in
        extent" case would produce symptoms if we are trying to remap a
        block from "extent" to "next_extent", and the two extents are
        pointed to by different index nodes.  _extent_replace(...,
        next_extent) updates e_lblk in the leaf extent, but because there's
        no _extent_fix_parents() call, the index nodes never get updated.
        In the _punch_extent() case, we conclude that we need to split an
        extent into two pieces since we're punching out the middle.  If the
        extent is the last extent in the block, the second extent will be
        inserted into a new leaf node block.  Without _fix_parents(), the
        index node doesn't seem to get updated.
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
    • Matthieu Dupont's avatar
  3. 24 Oct, 2015 7 commits
  4. 29 Sep, 2015 1 commit
  5. 19 Sep, 2015 1 commit
  6. 09 Sep, 2015 1 commit
  7. 06 Sep, 2015 2 commits
  8. 23 Jul, 2015 1 commit
  9. 22 Jul, 2015 4 commits
  10. 16 Jul, 2015 2 commits
  11. 15 Jul, 2015 1 commit
  12. 13 Jul, 2015 6 commits