mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
f2fs: preload extent_cache for POSIX_FADV_WILLNEED
This patch tries to preload extent_cache given POSIX_FADV_WILLNEED, which is more useful for generic usecases. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
f5f3bd903a
commit
3e729e50d0
|
|
@ -4858,6 +4858,9 @@ static int f2fs_file_fadvise(struct file *filp, loff_t offset, loff_t len,
|
|||
filp->f_mode &= ~FMODE_RANDOM;
|
||||
spin_unlock(&filp->f_lock);
|
||||
return 0;
|
||||
} else if (advice == POSIX_FADV_WILLNEED && offset == 0) {
|
||||
/* Load extent cache at the first readahead. */
|
||||
f2fs_precache_extents(inode);
|
||||
}
|
||||
|
||||
err = generic_fadvise(filp, offset, len, advice);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user