diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-15 02:09:00 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-15 02:09:00 +0100 |
commit | 80eabba70260dcb55b05098f6c1fecbe5c0e518b (patch) | |
tree | c9f5d19803a3387d2b9d8a6998eb9c58bad2a15a /fs/ext4/extents.c | |
parent | docs: add back 'Documentation/Changes' file (as symlink) (diff) | |
parent | fs: Remove unmap_underlying_metadata (diff) | |
download | linux-80eabba70260dcb55b05098f6c1fecbe5c0e518b.tar.xz linux-80eabba70260dcb55b05098f6c1fecbe5c0e518b.zip |
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
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 3e1014fe835e..b1f8416923ab 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3777,14 +3777,6 @@ out: return err; } -static void unmap_underlying_metadata_blocks(struct block_device *bdev, - sector_t block, int count) -{ - int i; - for (i = 0; i < count; i++) - unmap_underlying_metadata(bdev, block + i); -} - /* * Handle EOFBLOCKS_FL flag, clearing it if necessary */ @@ -4121,9 +4113,8 @@ out: * new. */ if (allocated > map->m_len) { - unmap_underlying_metadata_blocks(inode->i_sb->s_bdev, - newblock + map->m_len, - allocated - map->m_len); + clean_bdev_aliases(inode->i_sb->s_bdev, newblock + map->m_len, + allocated - map->m_len); allocated = map->m_len; } map->m_len = allocated; |