Merge branch 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block
Pull fs meta data unmap optimization from Jens Axboe: "A series from Jan Kara, providing a more efficient way for unmapping meta data from in the buffer cache than doing it block-by-block. Provide a general helper that existing callers can use" * 'for-4.10/fs-unmap' of git://git.kernel.dk/linux-block: fs: Remove unmap_underlying_metadata fs: Add helper to clean bdev aliases under a bh and use it ext2: Use clean_bdev_aliases() instead of iteration ext4: Use clean_bdev_aliases() instead of iteration direct-io: Use clean_bdev_aliases() instead of handmade iteration fs: Provide function to unmap metadata for a range of blocks
This commit is contained in:
@@ -732,16 +732,13 @@ static int ext2_get_blocks(struct inode *inode,
|
||||
}
|
||||
|
||||
if (IS_DAX(inode)) {
|
||||
int i;
|
||||
|
||||
/*
|
||||
* We must unmap blocks before zeroing so that writeback cannot
|
||||
* overwrite zeros with stale data from block device page cache.
|
||||
*/
|
||||
for (i = 0; i < count; i++) {
|
||||
unmap_underlying_metadata(inode->i_sb->s_bdev,
|
||||
le32_to_cpu(chain[depth-1].key) + i);
|
||||
}
|
||||
clean_bdev_aliases(inode->i_sb->s_bdev,
|
||||
le32_to_cpu(chain[depth-1].key),
|
||||
count);
|
||||
/*
|
||||
* block must be initialised before we put it in the tree
|
||||
* so that it's not found by another thread before it's
|
||||
|
Reference in New Issue
Block a user