[Linux-cachefs] [PATCH] fs: cachefiles: Add support for large files in filesystem caching
Suresh Jayaraman
sureshjayaram at gmail.com
Wed Apr 11 14:57:22 UTC 2012
On Tue, Apr 3, 2012 at 7:08 PM, justin <jlec at gentoo.org> wrote:
> From 87b3da18f351c4f91d608e75e235c22cd30d7818 Mon Sep 17 00:00:00 2001
> From: Justin Lecher <jlec at gentoo.org>
> Date: Tue, 3 Apr 2012 13:51:58 +0200
> Subject: [PATCH] fs: cachefiles: Add support for large files in filesystem
> caching
>
> Support the caching of large files.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=31182
>
> Signed-off-by: Justin Lecher <jlec at gentoo.org>
> ---
> fs/cachefiles/rdwr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
While preparing a similar patch to make cachefiles support files larger
than 2GB, I noticed that you had beaten me to it. Confirming that this
patch allows caching of larger files which would not be cached otherwise.
Tested-by: Suresh Jayaraman <sjayaraman at suse.com>
diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
> index 0e3c092..cc7ef95 100644
> --- a/fs/cachefiles/rdwr.c
> +++ b/fs/cachefiles/rdwr.c
> @@ -918,7 +918,7 @@ int cachefiles_write_page(struct fscache_storage
> *op, struct page *page)
> * own time */
> dget(object->backer);
> mntget(cache->mnt);
> - file = dentry_open(object->backer, cache->mnt, O_RDWR,
> + file = dentry_open(object->backer, cache->mnt, (O_RDWR |
> O_LARGEFILE),
> cache->cache_cred);
> if (IS_ERR(file)) {
> ret = PTR_ERR(file);
>
More information about the Linux-cachefs
mailing list