1. 28 3月, 2012 2 次提交
  2. 27 3月, 2012 1 次提交
    • J
      Btrfs: fix regression in scrub path resolving · 7a3ae2f8
      Jan Schmidt 提交于
      In commit 4692cf58 we introduced new backref walking code for btrfs. This
      assumes we're searching live roots, which requires a transaction context.
      While scrubbing, however, we must not join a transaction because this could
      deadlock with the commit path. Additionally, what scrub really wants to do
      is resolving a logical address in the commit root it's currently checking.
      
      This patch adds support for logical to path resolving on commit roots and
      makes scrub use that.
      Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net>
      7a3ae2f8
  3. 22 3月, 2012 3 次提交
  4. 15 2月, 2012 1 次提交
  5. 05 1月, 2012 1 次提交
    • J
      Btrfs: new backref walking code · 4692cf58
      Jan Schmidt 提交于
      The old backref iteration code could only safely be used on commit roots.
      Besides this limitation, it had bugs in finding the roots for these
      references. This commit replaces large parts of it by btrfs_find_all_roots()
      which a) really finds all roots and the correct roots, b) works correctly
      under heavy file system load, c) considers delayed refs.
      Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net>
      4692cf58
  6. 22 12月, 2011 1 次提交
    • S
      Btrfs: integrate integrity check module into btrfs · 21adbd5c
      Stefan Behrens 提交于
      This is the last part of the patch series. It modifies the btrfs
      code to use the integrity check module if configured to do so
      with the define BTRFS_FS_CHECK_INTEGRITY. If this define is not set,
      the only effective change is that code is added that handles the
      mount option to activate the integrity check. If the mount option is
      set and the define BTRFS_FS_CHECK_INTEGRITY is not set, that code
      complains in the log and the mount fails with EINVAL.
      
      Add the mount option to activate the usage of the integrity check
      code.
      Add invocation of btrfs integrity check code init and cleanup
      function on mount and umount, respectively.
      Add hook to call btrfs integrity check code version of
      submit_bh/submit_bio.
      Signed-off-by: NStefan Behrens <sbehrens@giantdisaster.de>
      21adbd5c
  7. 16 12月, 2011 1 次提交
    • J
      Btrfs: fix num_workers_starting bug and other bugs in async thread · 0dc3b84a
      Josef Bacik 提交于
      Al pointed out we have some random problems with the way we account for
      num_workers_starting in the async thread stuff.  First of all we need to make
      sure to decrement num_workers_starting if we fail to start the worker, so make
      __btrfs_start_workers do this.  Also fix __btrfs_start_workers so that it
      doesn't call btrfs_stop_workers(), there is no point in stopping everybody if we
      failed to create a worker.  Also check_pending_worker_creates needs to call
      __btrfs_start_work in it's work function since it already increments
      num_workers_starting.
      
      People only start one worker at a time, so get rid of the num_workers argument
      everywhere, and make btrfs_queue_worker a void since it will always succeed.
      Thanks,
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      0dc3b84a
  8. 01 12月, 2011 1 次提交
  9. 20 11月, 2011 1 次提交
    • J
      btrfs: Fix up 32/64-bit compatibility for new ioctls · 745c4d8e
      Jeff Mahoney 提交于
       This patch casts to unsigned long before casting to a pointer and fixes
       the following warnings:
      fs/btrfs/extent_io.c:2289:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      fs/btrfs/ioctl.c:2933:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      fs/btrfs/ioctl.c:2937:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      fs/btrfs/ioctl.c:3020:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      fs/btrfs/scrub.c:275:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      fs/btrfs/backref.c:686:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      745c4d8e
  10. 11 11月, 2011 1 次提交
  11. 06 11月, 2011 3 次提交
  12. 02 10月, 2011 1 次提交
    • A
      btrfs: use readahead API for scrub · 7a26285e
      Arne Jansen 提交于
      Scrub uses a simple tree-enumeration to bring the relevant portions
      of the extent- and csum-tree into the page cache before starting the
      scrub-I/O. This is now replaced by using the new readahead-API.
      During readahead the scrub is being accounted as paused, so it won't
      hold off transaction commits.
      
      This change raises the average disk bandwith utilisation on my test
      volume from 70% to 90%. On another volume, the time for a test run
      went down from 89s to 43s.
      
      Changes v5:
       - reada1/2 are now of type struct reada_control *
      Signed-off-by: NArne Jansen <sensille@gmx.net>
      7a26285e
  13. 29 9月, 2011 7 次提交
  14. 10 6月, 2011 3 次提交
  15. 04 6月, 2011 3 次提交
  16. 27 5月, 2011 1 次提交
  17. 12 5月, 2011 3 次提交
    • A
      btrfs: add readonly flag · 8628764e
      Arne Jansen 提交于
      setting the readonly flag prevents writes in case an error is detected
      Signed-off-by: NArne Jansen <sensille@gmx.net>
      8628764e
    • I
      btrfs scrub: make fixups sync · 96e36920
      Ilya Dryomov 提交于
      btrfs scrub - make fixups sync, don't reuse fixup bios
      
      Fixups are already sync for csum failures, this patch makes them sync
      for EIO case as well.
      
      Fixups are now sharing pages with the parent sbio - instead of
      allocating a separate page to do a fixup we grab the page from the sbio
      buffer.
      
      Fixup bios are no longer reused.
      
      struct fixup is no longer needed, instead pass [sbio pointer, index].
      
      Originally this was added to look at the possibility of sharing the code
      between drive swap and scrub, but it actually fixes a serious bug in
      scrub code where errors that could be corrected were ignored and
      reported as uncorrectable.
      
      btrfs scrub - restore bios properly after media errors
      
      The current code reallocates a bio after a media error.  This is a
      temporary measure introduced in v3 after a serious problem related to
      bio reuse was found in v2 of scrub patchset.
      
      Basically we did not reset bv_offset and bv_len fields of the bio_vec
      structure.  They are changed in case I/O error happens, for example, at
      offset 512 or 1024 into the page.  Also bi_flags field wasn't properly
      setup before reusing the bio.
      Signed-off-by: NArne Jansen <sensille@gmx.net>
      96e36920
    • A
      btrfs: scrub · a2de733c
      Arne Jansen 提交于
      This adds an initial implementation for scrub. It works quite
      straightforward. The usermode issues an ioctl for each device in the
      fs. For each device, it enumerates the allocated device chunks. For
      each chunk, the contained extents are enumerated and the data checksums
      fetched. The extents are read sequentially and the checksums verified.
      If an error occurs (checksum or EIO), a good copy is searched for. If
      one is found, the bad copy will be rewritten.
      All enumerations happen from the commit roots. During a transaction
      commit, the scrubs get paused and afterwards continue from the new
      roots.
      
      This commit is based on the series originally posted to linux-btrfs
      with some improvements that resulted from comments from David Sterba,
      Ilya Dryomov and Jan Schmidt.
      Signed-off-by: NArne Jansen <sensille@gmx.net>
      a2de733c