Suresh Jayaraman | 11 Jun 07:38 2012

[PATCH] [RESEND] fs: cachefiles: Add support for large files in filesystem caching

The below patch which was first posted here:

   https://lkml.org/lkml/2012/4/3/193

and tested by me and picked up by the maintainer here:

   https://lkml.org/lkml/2012/5/1/57

But it seems to not to have made to the linux-next or Linus tree.
I'm resending what it seems like a lost patch.

From: Justin Lecher <jlec <at> gentoo.org>

Support the caching of large files.

https://bugzilla.kernel.org/show_bug.cgi?id=31182

Signed-off-by: Justin Lecher <jlec <at> gentoo.org>
Tested-by: Suresh Jayaraman <sjayaraman <at> suse.com>
---
 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
 <at>  <at>  -919,7 +919,7  <at>  <at>  int cachefiles_write_page(struct fscache_storage *op, struct page *page)
 	dget(object->backer);
 	mntget(cache->mnt);
(Continue reading)

Andrew Morton | 19 Jun 01:04 2012

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

On Mon, 11 Jun 2012 11:08:21 +0530
Suresh Jayaraman <sjayaraman <at> suse.com> wrote:

> The below patch which was first posted here:
> 
>    https://lkml.org/lkml/2012/4/3/193
> 
> and tested by me and picked up by the maintainer here:
> 
>    https://lkml.org/lkml/2012/5/1/57
> 
> But it seems to not to have made to the linux-next or Linus tree.
> I'm resending what it seems like a lost patch.
> 
> 
> From: Justin Lecher <jlec <at> gentoo.org>
> 
> Support the caching of large files.
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=31182
> 
> Signed-off-by: Justin Lecher <jlec <at> gentoo.org>
> Tested-by: Suresh Jayaraman <sjayaraman <at> suse.com>
> ---
>  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
(Continue reading)

Suresh Jayaraman | 19 Jun 07:27 2012

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

On 06/19/2012 04:34 AM, Andrew Morton wrote:
>> From: Justin Lecher <jlec <at> gentoo.org>
>>
>> Support the caching of large files.
>>
>> https://bugzilla.kernel.org/show_bug.cgi?id=31182
>>
>> Signed-off-by: Justin Lecher <jlec <at> gentoo.org>
>> Tested-by: Suresh Jayaraman <sjayaraman <at> suse.com>
>> ---
>>  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
>>  <at>  <at>  -919,7 +919,7  <at>  <at>  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.

(Continue reading)

Andrew Morton | 19 Jun 09:52 2012

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

On Tue, 19 Jun 2012 10:57:27 +0530 Suresh Jayaraman <sjayaraman <at> suse.com> wrote:

> > 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. 

Well it will need a lot more coverage testing than that.  truncate? 
expanding truncate?  write, lseek, pwrite, pread(), mmap(MAP_SHARED),
behavior at the new max file size (what is that?), etc.

justin | 19 Jun 09:58 2012
Picon

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

On 19/06/12 09:52, Andrew Morton wrote:
> On Tue, 19 Jun 2012 10:57:27 +0530 Suresh Jayaraman <sjayaraman <at> suse.com> wrote:
> 
>>> 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. 
> 
> Well it will need a lot more coverage testing than that.  truncate? 
> expanding truncate?  write, lseek, pwrite, pread(), mmap(MAP_SHARED),
> behavior at the new max file size (what is that?), etc.
> 

Hello,

I am using this patch since the 2.6.3* linux, while working with files
>4 Gb on a daily bases. This isn't a testsuite, but it worked fine for
me all the time.

How would such testsuite you request look like? Anybody willing to write it?

Thanks,
Justin

Suresh Jayaraman | 20 Jun 15:35 2012

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

On 06/19/2012 01:22 PM, Andrew Morton wrote:
> On Tue, 19 Jun 2012 10:57:27 +0530 Suresh Jayaraman <sjayaraman <at> suse.com> wrote:
> 
>>> 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. 
> 
> Well it will need a lot more coverage testing than that.  truncate? 
> expanding truncate?  write, lseek, pwrite, pread(), mmap(MAP_SHARED),
> behavior at the new max file size (what is that?), etc.
> 

The changelog could be slightly misleading as the patch doesn't really
add LFS support. It just passes O_LARGEFILE flag to dentry_open() to make
VFS allow cachefiles to open larger files (instead of failing it with
-EOVERFLOW). Cachefiles is just a cache that uses the VFS/VM interfaces to
get another disk filesystem to do the requisite I/O on its behalf.
So, I doubt whether more coverage testing is required for this change.

Anyway, I'm attaching a quick and dirty test program that might help
(not well tested though). I'm unable to to test it as I have modified
my setup and have to redo it.

Justin, do you have the setup and can you get this tested?

(Continue reading)

Justin | 20 Jun 21:45 2012
Picon

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

On 20.06.2012 15:35, Suresh Jayaraman wrote:
> On 06/19/2012 01:22 PM, Andrew Morton wrote:
>> On Tue, 19 Jun 2012 10:57:27 +0530 Suresh Jayaraman <sjayaraman <at> suse.com> wrote:
>>
>>>> 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. 
>>
>> Well it will need a lot more coverage testing than that.  truncate? 
>> expanding truncate?  write, lseek, pwrite, pread(), mmap(MAP_SHARED),
>> behavior at the new max file size (what is that?), etc.
>>
> 
> The changelog could be slightly misleading as the patch doesn't really
> add LFS support. It just passes O_LARGEFILE flag to dentry_open() to make
> VFS allow cachefiles to open larger files (instead of failing it with
> -EOVERFLOW). Cachefiles is just a cache that uses the VFS/VM interfaces to
> get another disk filesystem to do the requisite I/O on its behalf.
> So, I doubt whether more coverage testing is required for this change.
> 
> Anyway, I'm attaching a quick and dirty test program that might help
> (not well tested though). I'm unable to to test it as I have modified
> my setup and have to redo it.
> 
> Justin, do you have the setup and can you get this tested?
(Continue reading)


Gmane