lkml.org 
[lkml]   [2010]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Cleancache [PATCH 2/7] (was Transcendent Memory): core files
On Thu, Apr 22, 2010 at 06:28:09AM -0700, Dan Magenheimer wrote:
> +struct cleancache_ops {
> + int (*init_fs)(unsigned long);

unsigned long? Really? Not even size_t?

> + int (*init_shared_fs)(char *uuid, unsigned long);

Ditto.

> + int (*get_page)(int, unsigned long, unsigned long, struct page *);

Ugh. First of all, presumably you have some structure behind that index,
don't you? Might be a better way to do it.

What's more, use of ->i_ino is simply wrong. How stable do you want that
to be and how much do you want it to outlive struct address_space in question?
From my reading of your code, it doesn't outlive that anyway, so...

The third one is pgoff_t; again, use sane types, _if_ you actually want
the argument #3 at all - it can be derived from struct page you are passing
there as well.

> + int (*put_page)(int, unsigned long, unsigned long, struct page *);
> + int (*flush_page)(int, unsigned long, unsigned long);
> + int (*flush_inode)(int, unsigned long);
> + void (*flush_fs)(int);

Same questions as above...


\
 
 \ /
  Last update: 2010-05-15 01:21    [W:0.221 / U:25.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site