From d7fbd893388d9e86d29b7cfbd5457bcf03496fbf Mon Sep 17 00:00:00 2001 From: Ajeet Yadav Date: Tue, 27 Dec 2011 15:10:04 +0530 Subject: 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 Signed-off-by: Phillip Lougher --- fs/squashfs/squashfs_fs_sb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/squashfs/squashfs_fs_sb.h') 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 @@ struct squashfs_cache { char *name; int entries; + int curr_blk; int next_blk; int num_waiters; int unused; -- cgit v1.2.3