Btrfs: Bring back mount -o ssd optimizations

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-03-24 15:02:07 -04:00
parent 0d81ba5dbe
commit 239b14b32d
8 changed files with 103 additions and 2 deletions

View File

@@ -578,6 +578,11 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio)
map_tree = &root->fs_info->mapping_tree;
map_length = length;
ret = btrfs_map_block(map_tree, logical, &physical, &map_length, &dev);
if (map_length < length) {
printk("mapping failed logical %Lu bio len %Lu physical %Lu "
"len %Lu\n", logical, length, physical, map_length);
BUG();
}
BUG_ON(map_length < length);
bio->bi_sector = physical >> 9;
bio->bi_bdev = dev->bdev;