- 25 Sep, 2008 10 commits
-
-
Chris Mason authored
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:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
This allows us to delete an unlinked inode with dirty pages from the list instead of forcing commit to write these out before deleting the inode. Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Mingming authored
Use btrfs_release_file instead of a put_inode call Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
2.6.18 seems to get caught in an infinite loop when cancel_rearming_delayed_workqueue is called more than once, so this switches to cancel_delayed_work, which is arguably more correct. Also, balance_dirty_pages can run into problems with 2.6.18 based kernels because it doesn't have the per-bdi dirty limits. This avoids calling balance_dirty_pages on the btree inode unless there is actually something to balance, which is a good optimization in general. Finally there's a compile fix for ordered-data.h Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
Using ilookup5 during data=ordered writeback could deadlock on I_LOCK. This saves a pointer to the inode instead. Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
Signed-off-by:
Chris Mason <chris.mason@oracle.com>
-
Chris Mason authored
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:
Chris Mason <chris.mason@oracle.com>
-