diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-14 20:09:00 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-14 20:09:00 -0500 |
| commit | 80eabba70260dcb55b05098f6c1fecbe5c0e518b (patch) | |
| tree | c9f5d19803a3387d2b9d8a6998eb9c58bad2a15a /fs/ntfs | |
| parent | 852d21ae1fcdf0e4de6b5bfa730d29cb013c7ff3 (diff) | |
| parent | ce98321bf7d274a470642ef99e1d82512673ce7c (diff) | |
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/ntfs')
| -rw-r--r-- | fs/ntfs/aops.c | 2 | ||||
| -rw-r--r-- | fs/ntfs/file.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c index d0cf6fee5c77..cc91856b5e2d 100644 --- a/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c | |||
| @@ -765,7 +765,7 @@ lock_retry_remap: | |||
| 765 | } | 765 | } |
| 766 | // TODO: Instantiate the hole. | 766 | // TODO: Instantiate the hole. |
| 767 | // clear_buffer_new(bh); | 767 | // clear_buffer_new(bh); |
| 768 | // unmap_underlying_metadata(bh->b_bdev, bh->b_blocknr); | 768 | // clean_bdev_bh_alias(bh); |
| 769 | ntfs_error(vol->sb, "Writing into sparse regions is " | 769 | ntfs_error(vol->sb, "Writing into sparse regions is " |
| 770 | "not supported yet. Sorry."); | 770 | "not supported yet. Sorry."); |
| 771 | err = -EOPNOTSUPP; | 771 | err = -EOPNOTSUPP; |
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index bf72a2c58b75..99510d811a8c 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
| @@ -740,8 +740,7 @@ map_buffer_cached: | |||
| 740 | set_buffer_uptodate(bh); | 740 | set_buffer_uptodate(bh); |
| 741 | if (unlikely(was_hole)) { | 741 | if (unlikely(was_hole)) { |
| 742 | /* We allocated the buffer. */ | 742 | /* We allocated the buffer. */ |
| 743 | unmap_underlying_metadata(bh->b_bdev, | 743 | clean_bdev_bh_alias(bh); |
| 744 | bh->b_blocknr); | ||
| 745 | if (bh_end <= pos || bh_pos >= end) | 744 | if (bh_end <= pos || bh_pos >= end) |
| 746 | mark_buffer_dirty(bh); | 745 | mark_buffer_dirty(bh); |
| 747 | else | 746 | else |
| @@ -784,7 +783,7 @@ map_buffer_cached: | |||
| 784 | continue; | 783 | continue; |
| 785 | } | 784 | } |
| 786 | /* We allocated the buffer. */ | 785 | /* We allocated the buffer. */ |
| 787 | unmap_underlying_metadata(bh->b_bdev, bh->b_blocknr); | 786 | clean_bdev_bh_alias(bh); |
| 788 | /* | 787 | /* |
| 789 | * If the buffer is fully outside the write, zero it, | 788 | * If the buffer is fully outside the write, zero it, |
| 790 | * set it uptodate, and mark it dirty so it gets | 789 | * set it uptodate, and mark it dirty so it gets |
