1. 01 2月, 2018 30 次提交
  2. 31 1月, 2018 2 次提交
  3. 30 1月, 2018 3 次提交
  4. 29 1月, 2018 5 次提交
    • C
      xfs: remove experimental tag for reflinks · 1e369b0e
      Christoph Hellwig 提交于
      But reject reflink + DAX file systems for now until the code to
      support reflinks on DAX is actually implemented.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      [darrick: port to 4.16]
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      1e369b0e
    • D
      xfs: don't screw up direct writes when freesp is fragmented · 6d8a45ce
      Darrick J. Wong 提交于
      xfs_bmap_btalloc is given a range of file offset blocks that must be
      allocated to some data/attr/cow fork.  If the fork has an extent size
      hint associated with it, the request will be enlarged on both ends to
      try to satisfy the alignment hint.  If free space is fragmentated,
      sometimes we can allocate some blocks but not enough to fulfill any of
      the requested range.  Since bmapi_allocate always trims the new extent
      mapping to match the originally requested range, this results in
      bmapi_write returning zero and no mapping.
      
      The consequences of this vary -- buffered writes will simply re-call
      bmapi_write until it can satisfy at least one block from the original
      request.  Direct IO overwrites notice nmaps == 0 and return -ENOSPC
      through the dio mechanism out to userspace with the weird result that
      writes fail even when we have enough space because the ENOSPC return
      overrides any partial write status.  For direct CoW writes the situation
      was disastrous because nobody notices us returning an invalid zero-length
      wrong-offset mapping to iomap and the write goes off into space.
      
      Therefore, if free space is so fragmented that we managed to allocate
      some space but not enough to map into even a single block of the
      original allocation request range, we should break the alignment hint in
      order to guarantee at least some forward progress for the direct write.
      If we return a short allocation to iomap_apply it'll call back about the
      remaining blocks.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      6d8a45ce
    • D
      xfs: check reflink allocation mappings · 9f37bd11
      Darrick J. Wong 提交于
      There's a really bad bug in xfs_reflink_allocate_cow -- if bmapi_write
      can return a zero error code but no mappings.  This happens if there's
      an extent size hint (which causes allocation requests to be rounded to
      extsz granularity internally), but there wasn't a big enough chunk of
      free space to start filling at the extsz granularity and fill even one
      block of the range that we actually requested.
      
      In any case, if we got no mappings we can't possibly do anything useful
      with the contents of imap, so we must bail out with ENOSPC here.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      9f37bd11
    • D
      iomap: warn on zero-length mappings · 0c6dda7a
      Darrick J. Wong 提交于
      Don't let the iomap callback get away with feeding us a garbage zero
      length mapping -- there was a bug in xfs that resulted in those leaking
      out to hilarious effect.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      0c6dda7a
    • D
      xfs: treat CoW fork operations as delalloc for quota accounting · 4b4c1326
      Darrick J. Wong 提交于
      Since the CoW fork only exists in memory, it is incorrect to update the
      on-disk quota block counts when we modify the CoW fork.  Unlike the data
      fork, even real extents in the CoW fork are only delalloc-style
      reservations (on-disk they're owned by the refcountbt) so they must not
      be tracked in the on disk quota info.  Ensure the i_delayed_blks
      accounting reflects this too.
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      4b4c1326