diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-08-19 23:13:47 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-26 09:42:46 +0100 |
commit | 5dfb9eb6ca6ad3de8af37210b1eadf5faf7cdc32 (patch) | |
tree | a742e2de34e5e8eed769b6f96f8766b419d5b1fc /fs/f2fs/node.h | |
parent | 6ef26eb15521edf9819bb05b2eda0ed5213f2c08 (diff) |
f2fs: avoid unneeded loop in build_sit_entries
commit d600af236da51d9e3b90d21a23f95b820bd02e2f upstream.
When building each sit entry in cache, firstly, we will load it from
sit page, and then check all entries in sit journal, if there is one
updated entry in journal, cover cached entry with the journaled one.
Actually, most of check operation is unneeded since we only need
to update cached entries with journaled entries in batch, so
changing the flow as below for more efficient:
1. load all sit entries into cache from sit pages;
2. update sit entries with journal.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[bwh: Backported to 4.4:
- Keep using curseg->curseg_mutex for serialisation
- Use sum instead of journal
- Don't add f2fs_discard_en() condition]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/f2fs/node.h')
0 files changed, 0 insertions, 0 deletions