[PATCH 6/6] KEYS: Merge the type-specific data with the payload data

2015-10-21 Thread David Howells
Merge the type-specific data with the payload data into one four-word chunk as it seems pointless to keep them separate. Use user_key_payload() for accessing the payloads of overloaded user-defined keys. Signed-off-by: David Howells cc: linux-c...@vger.kernel.org cc: ecryp...@vger.kernel.org cc

Re: fscache recursive hang -- similar to loopback NFS issues

2014-08-05 Thread David Howells
Milosz Tanski wrote: > FSCache already tracks statistics about how long writes and reads take > (at least if you enable that option). With those stats in hand we > should be able generate a default timeout value that works well and > avoid a tunable. If stat generation is going to be on all the

Re: fscache recursive hang -- similar to loopback NFS issues

2014-07-29 Thread David Howells
Milosz Tanski wrote: > That's the same thing exact fix I started testing on Saturday. I found that > there already is a wait_event_timeout (even without your recent changes). The > thing I'm not quite sure is what timeout it should use? That's probably something to make an external tuning knob f

Re: hung task on page invalidate

2013-10-11 Thread David Howells
Milosz Tanski wrote: > The patch that you sent me in private last week solved this issue and > I haven't experienced it. I haven't seen the patch go into your > linus-fs.git tree, so I don't know if you submitted the fix upstream > to the linux kernel. So I'm following up to see if you plan are >

Re: hung task on page invalidate

2013-10-03 Thread David Howells
Milosz Tanski wrote: > Stores : ops=10257 run=67477 pgs=57220 rxd=62216 olm=14 I think this line probably shows the problem. The olm=14 indicates that 14 pages were found over the store limit set on the object. Look in fscache_write_op() for: if (page->index > op->store_limit) {

Re: hung task on page invalidate

2013-09-30 Thread David Howells
Milosz Tanski wrote: > In my test cluster I started seeing an issue when the fscache get > stuck waiting on pending writes when doing page invalidate. The > problem happens because it looks like the page never leaves the > cookie->store page tree. > > I've been reading the different code paths i

[GIT PULL] NFS/FS-Cache: Fix crash from accidentally starting caching whilst writing

2013-09-27 Thread David Howells
o control whether to get an fscache cookie in nfs_open() (2013-09-27 18:40:25 +0100) (from the branch description for fscache local branch) clone of "master" ----------

[PATCH 2/3] FS-Cache: Provide the ability to enable/disable cookies

2013-09-20 Thread David Howells
se no one else can get at the cookie before this returns. Signed-off-by: David Howells cache = fscache_acquire_cookie(afs_cache_netfs.primary_index, &afs_cell_cache_index_def, -

[PATCH 3/3] NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open()

2013-09-20 Thread David Howells
's also possible to have a two-way race on this if the file is opened O_TRUNC|O_RDONLY instead. Reported-by: Mark Moseley Signed-off-by: David Howells --- fs/nfs/dir.c |2 - fs/nfs/fscache.c | 192 ++-- fs/nfs/fscache.h |

[PATCH 1/3] FS-Cache: Add use/unuse/wake cookie wrappers

2013-09-20 Thread David Howells
that we don't have to deal with undoing it if anything earlier fails. Possibly this should be moved into fscache_submit_op() which could look at FSCACHE_OP_UNUSE_COOKIE. Signed-off-by: David Howells --- fs/fscache/cookie.c |7 +-- fs/fscache

[RFC][PATCH 0/3] FS-Cache: NFS(/CIFS/Ceph/9P): Fix start-caching whilst writing race

2013-09-20 Thread David Howells
s probably safe. David --- David Howells (3): FS-Cache: Add use/unuse/wake cookie wrappers FS-Cache: Provide the ability to enable/disable cookies NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open() Documentation/filesystems/caching/netfs-api.

[PATCH 2/2] CacheFiles: Don't try to dump the index key if the cookie has been cleared

2013-09-20 Thread David Howells
->netfs_data pointers have been cleared - and a NULL pointer exception will ensue, usually just after a: CacheFiles: Error: Unexpected object collision error is reported. Signed-off-by: David Howells --- fs/cachefiles/namei.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 1/2] CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths

2013-09-20 Thread David Howells
appropriately typed variable rather than to ret. Signed-off-by: Josh Boyer Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- fs/cachefiles/xattr.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/fs/cachefiles/xattr.c

[PATCH] CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths

2013-09-11 Thread David Howells
it to an appropriately typed variable rather than to ret. Signed-off-by: Josh Boyer Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- fs/cachefiles/xattr.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/fs/cachefiles/xattr.c

Re: [PATCH] fscache: check consistency does not decrement refcount

2013-09-10 Thread David Howells
/0x200 [ceph] > [] ? __fsnotify_inode_delete+0xe/0x10 > [] destroy_inode+0x3c/0x70 > [] evict+0x119/0x1b0 > > Signed-off-by: Milosz Tanski Acked-by: David Howells -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to maj

Re: [PATCH 0/8] ceph: fscache support & upstream changes

2013-09-09 Thread David Howells
Milosz Tanski wrote: > I think that change does the trick. I had it running on the same > machine for 5 hours and had the kernel forcefully drop some of the > inodes in the cache (via drop caches) without a crash. I'll send a > proper patch email after you take a look and make sure I did the righ

Re: [PATCH 0/8] ceph: fscache support & upstream changes

2013-09-09 Thread David Howells
Milosz Tanski wrote: > - (1 << FSCACHE_OP_WAITING); > + (1 << FSCACHE_OP_WAITING) | > + (1 << FSCACHE_OP_UNUSE_COOKIE); Yeah... That'll do it. We could just decrement n_active directly after calling into the backend - after all, we cannot reduce n_acti

Re: [PATCH 0/8] ceph: fscache support & upstream changes

2013-09-06 Thread David Howells
Milosz Tanski wrote: > After running this for a day on some loaded machines I ran into what > looks like an old issue with the new code. I remember you saw an issue > that manifested it self in a similar way a while back. > > [13837253.462779] FS-Cache: Assertion failed > [13837253.462782] 3 ==

[PATCH 2/8] CacheFiles: Implement interface to check cache consistency

2013-09-05 Thread David Howells
Implement the FS-Cache interface to check the consistency of a cache object in CacheFiles. Original-author: Hongyi Jia Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- fs/cachefiles/interface.c | 26 ++ fs/cachefiles/internal.h |1 + fs

[PATCH 1/8] FS-Cache: Add interface to check consistency of a cached object

2013-09-05 Thread David Howells
Cache takes care of pinning the object and the cookie in memory and managing this call with respect to the object state. Original-author: Hongyi Jia Signed-off-by: David Howells cc: Hongyi Jia cc: Milosz Tanski --- Documentation/filesystems/caching/backend-api.txt |9 +++ Document

Re: [PATCHv4 0/5] ceph: persistent caching with fscache

2013-09-05 Thread David Howells
I've pushed the non-Ceph bits of the bad-page fix to here: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache and added a CIFS fix. David -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.ke

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 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 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)) > +

Re: [PATCHv4 0/5] ceph: persistent caching with fscache

2013-09-04 Thread David Howells
Sage Weil wrote: > David, are the fscache patches here ready for the next merge window? Do > you have a preference for whose tree they go through? There's only one problem - patch 1 needs to come _after_ patch 2 to avoid breaking git bisect. Plus these patches 2 and 4 extend the fscache API w

Re: Pages still marked with private_2

2013-09-04 Thread David Howells
Milosz Tanski wrote: > Am I on the right path here? I think you are! :-) Sorry for not getting back to you earlier, but August has been somewhat compressed due to PTO. David -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.ker

Re: API request

2013-08-07 Thread David Howells
Milosz Tanski wrote: > I would like to find out if you could add a new API for re-validating > a cookie. My use case is still FSCache support for Ceph. > > Ceph has a notion of capabilities (like CACHE cap) that can be > granted, revoked or given up. For example the code there to give up > the c

Re: [PATCH] ceph: Add FScache support

2013-07-09 Thread David Howells
Milosz Tanski wrote: > It looks like both the cifs and NFS code do not bother with any > locking around cifs_fscache_set_inode_cookie. Is there no concern over > multiple open() calls racing to create the cookie in those > filesystems? Yeah... That's probably wrong. AFS obviates the need for s

Re: [PATCH] ceph: Add FScache support

2013-07-03 Thread David Howells
Milosz Tanski wrote: > > Looking at your index structure, ceph has per-fsid indices under the top > > "ceph" index and then per-inode indices under those? Are fsids universally > > unique - or just for a given server/cell/whatever? > > It's my understanding that's a guuid assigned to the cluste

Re: [PATCH] ceph: Add FScache support

2013-07-02 Thread David Howells
Okay, my analysis of the patch: Looking at your index structure, ceph has per-fsid indices under the top "ceph" index and then per-inode indices under those? Are fsids universally unique - or just for a given server/cell/whatever? > +#ifdef CONFIG_CEPH_FSCACHE > + if (PageFsCache(page)) > +

Re: [PATCH] ceph: Add FScache support

2013-07-02 Thread David Howells
Milosz Tanski wrote: > You can also get the 'wip-ceph-fscache' branch from my gitrepo: There's only one patch from you there. Shouldn't there be at least two as you posted? David -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger

Re: [PATCH] ceph: Add FScache support

2013-07-02 Thread David Howells
Milosz Tanski wrote: > I just looked and saw that it's been pulled a couple hours ago. > > Can I also trouble you into looking at my patches for Ceph for the > FSCache? We're using it (in production starting today actually); we're > not able to find any bugs with the current iteration. But it's

Re: [PATCH] ceph: Add FScache support

2013-07-02 Thread David Howells
Milosz Tanski wrote: > Now that 3.10 is out I hope that David Howell's fscache improvement > branch will go into the next kernel. It has just been pulled. David -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More ma