aboutsummaryrefslogtreecommitdiffstats
path: root/fs/squashfs/squashfs_fs_sb.h
diff options
context:
space:
mode:
authorAjeet Yadav <ajeet.yadav.77@gmail.com>2011-12-27 04:40:04 -0500
committerPhillip Lougher <phillip@squashfs.org.uk>2011-12-29 20:24:13 -0500
commitd7fbd893388d9e86d29b7cfbd5457bcf03496fbf (patch)
treeea94d043ee3e842f7273391b143a5949afb39975 /fs/squashfs/squashfs_fs_sb.h
parent89cab5b5727d3139adc247e3a3d4ee5b10e3eda5 (diff)
Squashfs: optimise squashfs_cache_get entry search
squashfs_cache_get() iterates over all entries to search for block its looking for. Often get() / put() are called for same block. If we cache the current entry index, then we can optimise the subsequent *_get() calls. Signed-off-by: Ajeet Yadav <ajeet.yadav.77@gmail.com> Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
Diffstat (limited to 'fs/squashfs/squashfs_fs_sb.h')
-rw-r--r--fs/squashfs/squashfs_fs_sb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/squashfs/squashfs_fs_sb.h b/fs/squashfs/squashfs_fs_sb.h
index 651f0b31d296..52934a22f296 100644
--- a/fs/squashfs/squashfs_fs_sb.h
+++ b/fs/squashfs/squashfs_fs_sb.h
@@ -28,6 +28,7 @@
28struct squashfs_cache { 28struct squashfs_cache {
29 char *name; 29 char *name;
30 int entries; 30 int entries;
31 int curr_blk;
31 int next_blk; 32 int next_blk;
32 int num_waiters; 33 int num_waiters;
33 int unused; 34 int unused;