Re: [PATCH] [RESEND] fs: cachefiles: Add support for large filesin filesystem caching

From: Suresh Jayaraman
Date: Tue Jun 19 2012 - 01:28:21 EST


On 06/19/2012 04:34 AM, Andrew Morton wrote:
>> From: Justin Lecher <jlec@xxxxxxxxxx>
>>
>> Support the caching of large files.
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=31182
>>
>> Signed-off-by: Justin Lecher <jlec@xxxxxxxxxx>
>> Tested-by: Suresh Jayaraman <sjayaraman@xxxxxxxx>
>> ---
>> fs/cachefiles/rdwr.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/cachefiles/rdwr.c b/fs/cachefiles/rdwr.c
>> index 0e3c092..d136686 100644
>> --- a/fs/cachefiles/rdwr.c
>> +++ b/fs/cachefiles/rdwr.c
>> @@ -919,7 +919,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
>> dget(object->backer);
>> mntget(cache->mnt);
>> file = dentry_open(object->backer, cache->mnt, O_RDWR,
>> - cache->cache_cred);
>> + (O_RDWR | O_LARGEFILE), cache->cache_cred);
>
> Doesn't compile.

Oops, my bad. While refreshing the original patch against the latest
kernel, I seemed to have introduced an extra argument while attempting
to limit the characters to 80. Extremely sorry about that.

> How extensively was this change tested? Please describe the testing
> which was performed?
>

The original patch was tested by mounting a NFS share with fscache
option enabled, do a md5sum on a nfs file larger than 2GB and ensure
that the file is getting cached by fscache (watch cache size growing)
on x86_64.

Please find below the fixed one.


From: Justin Lecher <jlec@xxxxxxxxxx>
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

Tested by mounting a NFS share with fscache option enabled, do a
md5sum on a nfs file larger than 2GB and ensure that the file is getting
cached by fscache (watch cache size growing) on x86_64.

Signed-off-by: Justin Lecher <jlec@xxxxxxxxxx>
Signed-off-by: Suresh Jayaraman <sjayaraman@xxxxxxxx>
Tested-by: Suresh Jayaraman <sjayaraman@xxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Acked-by: David Howells <dhowells@xxxxxxxxxx>
---

fs/cachefiles/rdwr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/