1. 25 9月, 2008 12 次提交
    • Y
      Btrfs: Update and fix mount -o nodatacow · f321e491
      Yan Zheng 提交于
      To check whether a given file extent is referenced by multiple snapshots, the
      checker walks down the fs tree through dead root and checks all tree blocks in
      the path.
      
      We can easily detect whether a given tree block is directly referenced by other
      snapshot. We can also detect any indirect reference from other snapshot by
      checking reference's generation. The checker can always detect multiple
      references, but can't reliably detect cases of single reference. So btrfs may
      do file data cow even there is only one reference.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      f321e491
    • C
      Btrfs: Throttle operations if the reference cache gets too large · ab78c84d
      Chris Mason 提交于
      A large reference cache is directly related to a lot of work pending
      for the cleaner thread.  This throttles back new operations based on
      the size of the reference cache so the cleaner thread will be able to keep
      up.
      
      Overall, this actually makes the FS faster because the cleaner thread will
      be more likely to find things in cache.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      ab78c84d
    • C
      btrfs_start_transaction: wait for commits in progress to finish · f9295749
      Chris Mason 提交于
      btrfs_commit_transaction has to loop waiting for any writers in the
      transaction to finish before it can proceed.  btrfs_start_transaction
      should be polite and not join a transaction that is in the process
      of being finished off.
      
      There are a few places that can't wait, basically the ones doing IO that
      might be needed to finish the transaction.  For them, btrfs_join_transaction
      is added.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      f9295749
    • C
      Btrfs: New data=ordered implementation · e6dcd2dc
      Chris Mason 提交于
      The old data=ordered code would force commit to wait until
      all the data extents from the transaction were fully on disk.  This
      introduced large latencies into the commit and stalled new writers
      in the transaction for a long time.
      
      The new code changes the way data allocations and extents work:
      
      * When delayed allocation is filled, data extents are reserved, and
        the extent bit EXTENT_ORDERED is set on the entire range of the extent.
        A struct btrfs_ordered_extent is allocated an inserted into a per-inode
        rbtree to track the pending extents.
      
      * As each page is written EXTENT_ORDERED is cleared on the bytes corresponding
        to that page.
      
      * When all of the bytes corresponding to a single struct btrfs_ordered_extent
        are written, The previously reserved extent is inserted into the FS
        btree and into the extent allocation trees.  The checksums for the file
        data are also updated.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      e6dcd2dc
    • C
      Btrfs: Online btree defragmentation fixes · 3f157a2f
      Chris Mason 提交于
      The btree defragger wasn't making forward progress because the new key wasn't
      being saved by the btrfs_search_forward function.
      
      This also disables the automatic btree defrag, it wasn't scaling well to
      huge filesystems.  The auto-defrag needs to be done differently.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      3f157a2f
    • C
      Btrfs: Replace the transaction work queue with kthreads · a74a4b97
      Chris Mason 提交于
      This creates one kthread for commits and one kthread for
      deleting old snapshots.  All the work queues are removed.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      a74a4b97
    • C
      Add btrfs_end_transaction_throttle to force writers to wait for pending commits · 89ce8a63
      Chris Mason 提交于
      The existing throttle mechanism was often not sufficient to prevent
      new writers from coming in and making a given transaction run forever.
      This adds an explicit wait at the end of most operations so they will
      allow the current transaction to close.
      
      There is no wait inside file_write, inode updates, or cow filling, all which
      have different deadlock possibilities.
      
      This is a temporary measure until better asynchronous commit support is
      added.  This code leads to stalls as it waits for data=ordered
      writeback, and it really needs to be fixed.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      89ce8a63
    • C
      Btrfs: Split the extent_map code into two parts · d1310b2e
      Chris Mason 提交于
      There is now extent_map for mapping offsets in the file to disk and
      extent_io for state tracking, IO submission and extent_bufers.
      
      The new extent_map code shifts from [start,end] pairs to [start,len], and
      pushes the locking out into the caller.  This allows a few performance
      optimizations and is easier to use.
      
      A number of extent_map usage bugs were fixed, mostly with failing
      to remove extent_map entries when changing the file.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      d1310b2e
    • C
      Btrfs: Move snapshot creation to commit time · 3063d29f
      Chris Mason 提交于
      It is very difficult to create a consistent snapshot of the btree when
      other writers may update the btree before the commit is done.
      
      This changes the snapshot creation to happen during the commit, while
      no other updates are possible.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      3063d29f
    • C
      Btrfs: Add data=ordered support · dc17ff8f
      Chris Mason 提交于
      This forces file data extents down the disk along with the metadata that
      references them.  The current implementation is fairly simple, and just
      writes out all of the dirty pages in an inode before the commit.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      dc17ff8f
    • C
      Btrfs: Back port to 2.6.18-el kernels · 6da6abae
      Chris Mason 提交于
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      6da6abae
    • C
      5f39d397
  2. 11 9月, 2007 1 次提交
    • C
      Btrfs: Find and remove dead roots the first time a root is loaded. · 5ce14bbc
      Chris Mason 提交于
      Dead roots are trees left over after a crash, and they were either in the
      process of being removed or were waiting to be removed when the box crashed.
      Before, a search of the entire tree of root pointers was done on mount
      looking for dead roots.  Now, the search is done the first time we load
      a root.
      
      This makes mount faster when there are a large number of snapshots, and it
      enables the block accounting code to properly update the block counts on
      the latest root as old versions of the root are reaped after a crash.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      5ce14bbc
  3. 11 8月, 2007 2 次提交
  4. 09 8月, 2007 1 次提交
  5. 08 8月, 2007 1 次提交
  6. 23 6月, 2007 1 次提交
  7. 12 6月, 2007 1 次提交
  8. 09 6月, 2007 2 次提交
  9. 01 5月, 2007 1 次提交
  10. 28 4月, 2007 1 次提交
  11. 20 4月, 2007 1 次提交
  12. 02 4月, 2007 1 次提交
  13. 23 3月, 2007 2 次提交
  14. 17 3月, 2007 1 次提交