diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2016-02-01 13:00:25 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2016-02-29 23:29:10 +0100 |
commit | 5817b9dc9cc1225feedd9e1282707165fc64c384 (patch) | |
tree | 309d8459630ce24498e02b78091aa3e3594c8678 /fs/jffs2/jffs2_fs_sb.h | |
parent | mtd: brcmnand: Fix v7.1 register offsets (diff) | |
download | linux-5817b9dc9cc1225feedd9e1282707165fc64c384.tar.xz linux-5817b9dc9cc1225feedd9e1282707165fc64c384.zip |
jffs2: Improve post-mount CRC scan efficiency
We need to finish doing the CRC checks before we can allow writes to
happen, and we currently process the inodes in order. This means a call
to jffs2_get_ino_cache() for each possible inode# up to c->highest_ino.
There may be a lot of lookups which fail, if the inode# space is used
sparsely. And the inode# space is *often* used sparsely, if a file
system contains a lot of stuff that was put there in the original
image, followed by lots of creation and deletion of new files.
Instead of processing them numerically with a lookup each time, just
walk the hash buckets instead.
[fix locking typo reported by Dan Carpenter]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/jffs2_fs_sb.h')
-rw-r--r-- | fs/jffs2/jffs2_fs_sb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jffs2/jffs2_fs_sb.h b/fs/jffs2/jffs2_fs_sb.h index 046fee8b6e9b..778275f48a87 100644 --- a/fs/jffs2/jffs2_fs_sb.h +++ b/fs/jffs2/jffs2_fs_sb.h @@ -49,7 +49,7 @@ struct jffs2_sb_info { struct mtd_info *mtd; uint32_t highest_ino; - uint32_t checked_ino; + uint32_t check_ino; /* *NEXT* inode to be checked */ unsigned int flags; |