Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread Milosz Tanski
David, Is there anyway I can call you at (at your desk) during EST hours. I'd like to talk this part through since I think we're going a bit in circles. I'd like to get this fixed so we can submit the fscache for Ceph code for the upstream kernel in the merge window. Best, -- Milosz On Wed, Sep

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread Milosz Tanski
On Wed, Sep 4, 2013 at 2:13 PM, David Howells wrote: > Milosz Tanski wrote: > >> Is it as simple as stick a mutex at the top of the >> __fscache_check_consistency function before we try to find the object? > > You can lock a mutex in a function, but where are you actually going to place > the mut

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread David Howells
Milosz Tanski wrote: > Is it as simple as stick a mutex at the top of the > __fscache_check_consistency function before we try to find the object? You can lock a mutex in a function, but where are you actually going to place the mutex struct? And what other code is going to take it? To do this

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread Milosz Tanski
David, Is it as simple as stick a mutex at the top of the __fscache_check_consistency function before we try to find the object? This code should be called from a context that can sleep, in the Ceph code we call it from a delayed work queue (revalidate queue). -- Milosz On Wed, Sep 4, 2013 at 1:

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread David Howells
Milosz Tanski wrote: > If the cache is withdrawn and we're starting anew I would consider > that to okay. I would consider an empty page cache for a cookie to be > consistent since there's nothing stale that I can read. Unless there's > another synchronization issue that I'm missing in fscache.

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread Milosz Tanski
David, If the cache is withdrawn and we're starting anew I would consider that to okay. I would consider an empty page cache for a cookie to be consistent since there's nothing stale that I can read. Unless there's another synchronization issue that I'm missing in fscache. Thanks, - Milosz On We

Re: [PATCH 2/5] new fscache interface to check cache consistency

2013-09-04 Thread David Howells
Hongyi Jia wrote: > +bool __fscache_check_consistency(struct fscache_cookie *cookie) > +{ > + struct fscache_object *object; > + > + if (cookie->def->type != FSCACHE_COOKIE_TYPE_DATAFILE) > + return false; > + > + if (hlist_empty(&cookie->backing_objects)) > +

[PATCH 2/5] new fscache interface to check cache consistency

2013-08-21 Thread Hongyi Jia
Signed-off-by: Hongyi Jia Tested-by: Milosz Tanski --- fs/fscache/cookie.c | 22 ++ include/linux/fscache-cache.h | 4 include/linux/fscache.h | 17 + 3 files changed, 43 insertions(+) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie