1. 20 Jul, 2016 5 commits
  2. 21 Jun, 2016 14 commits
  3. 20 Jun, 2016 12 commits
  4. 01 Jun, 2016 5 commits
    • Dave Chinner's avatar
      xfs: reduce lock hold times in buffer writeback · 26f1fe85
      Dave Chinner authored
      When we have a lot of metadata to flush from the AIL, the buffer
      list can get very long. The current submission code tries to batch
      submission to optimise IO order of the metadata (i.e. ascending
      block order) to maximise block layer merging or IO to adjacent
      metadata blocks.
      
      Unfortunately, the method used can result in long lock times
      occurring as buffers locked early on in the buffer list might not be
      dispatched until the end of the IO licst processing. This is because
      sorting does not occur util after the buffer list has been processed
      and the buffers that are going to be submitted are locked. Hence
      when the buffer list is several thousand buffers long, the lock hold
      times before IO dispatch can be significant.
      
      To fix this, sort the buffer list before we start trying to lock and
      submit buffers. This means we can now submit buffers immediately
      after they are locked, allowing merging to occur immediately on the
      plug and dispatch to occur as quickly as possible. This means there
      is minimal delay between locking the buffer and IO submission
      occuring, hence reducing the worst case lock hold times seen during
      delayed write buffer IO submission signficantly.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      26f1fe85
    • Christoph Hellwig's avatar
      xfs: define XFS_IOC_FREEZE even if FIFREEZE is defined · 4478fb1f
      Christoph Hellwig authored
      And the same for XFS_IOC_THAW.  Just because we now have a common
      version of the ioctl we still need to provide the old name for it
      for anyone using those.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      
      4478fb1f
    • Eric Sandeen's avatar
      xfs: make several functions static · 0d5a75e9
      Eric Sandeen authored
      Al Viro noticed that xfs_lock_inodes should be static, and
      that led to ... a few more.
      
      These are just the easy ones, others require moving functions
      higher in source files, so that's not done here to keep
      this review simple.
      Signed-off-by: default avatarEric Sandeen <sandeen@sandeen.net>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      
      0d5a75e9
    • Brian Foster's avatar
      xfs: remove spurious shutdown type check from xfs_bmap_finish() · 0c871f9a
      Brian Foster authored
      The static checker reports that after commit 8d99fe92 ("xfs: fix
      efi/efd error handling to avoid fs shutdown hangs"), the code has been
      reworked such that error == -EFSCORRUPTED is not possible in this
      codepath.
      
      Remove the spurious error check and just use SHUTDOWN_META_IO_ERROR
      unconditionally.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      
      0c871f9a
    • Brian Foster's avatar
      xfs: fix broken multi-fsb buffer logging · a3916e52
      Brian Foster authored
      Multi-block buffers are logged based on buffer offset in
      xfs_trans_log_buf(). xfs_buf_item_log() ultimately walks each mapping in
      the buffer and marks the associated range to be logged in the
      xfs_buf_log_format bitmap for that mapping. This code is broken,
      however, in that it marks the actual buffer offsets of the associated
      range in each bitmap rather than shifting to the byte range for that
      particular mapping.
      
      For example, on a 4k fsb fs, buffer offset 4096 refers to the first byte
      of the second mapping in the buffer. This means byte 0 of the second log
      format bitmap should be tagged as dirty. Instead, the current code marks
      byte offset 4096 of the second log format bitmap, which is invalid and
      potentially out of range of the mapping.
      
      As a result of this, the log item format code invoked at transaction
      commit time is not be able to correctly identify what parts of the
      buffer to copy into log vectors. This can lead to NULL log vector
      pointer dereferences in CIL push context if the item format code was not
      able to locate any dirty ranges at all. This crash has been reproduced
      on a 4k FSB filesystem using 16k directory blocks where an unlink
      operation happened not to log anything in the first block of the
      mapping. The logged offsets were all over 4k, marked as such in the
      subsequent log format mappings, and thus left the transaction with an
      xfs_log_item that is marked DIRTY but without any logged regions.
      
      Further, even when the logged regions are marked correctly in the buffer
      log format bitmaps, the format code doesn't copy the correct ranges of
      the buffer into the log. This means that any logged region beyond the
      first block of a multi-block buffer is subject to corruption after a
      crash and log recovery sequence. This is due to a failure to convert the
      mapping bm_len field from basic blocks to bytes in the buffer offset
      tracking code in xfs_buf_item_format().
      
      Update xfs_buf_item_log() to convert buffer offsets to segment relative
      offsets when logging multi-block buffers. This ensures that the modified
      regions of a buffer are logged correctly and avoids the aforementioned
      crash. Also update xfs_buf_item_format() to correctly track the source
      offset into the buffer for the log vector formatting code. This ensures
      that the correct data is copied into the log.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarEric Sandeen <sandeen@redhat.com>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      
      
      a3916e52
  5. 29 May, 2016 3 commits
  6. 28 May, 2016 1 commit
    • Mikulas Patocka's avatar
      hpfs: implement the show_options method · 037369b8
      Mikulas Patocka authored
      The HPFS filesystem used generic_show_options to produce string that is
      displayed in /proc/mounts.  However, there is a problem that the options
      may disappear after remount.  If we mount the filesystem with option1
      and then remount it with option2, /proc/mounts should show both option1
      and option2, however it only shows option2 because the whole option
      string is replaced with replace_mount_options in hpfs_remount_fs.
      
      To fix this bug, implement the hpfs_show_options function that prints
      options that are currently selected.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      037369b8