mbox series

[0/2] ceph: adapt ceph to the fscache rewrite

Message ID 20211129162907.149445-1-jlayton@kernel.org (mailing list archive)
Headers show
Series ceph: adapt ceph to the fscache rewrite | expand

Message

Jeff Layton Nov. 29, 2021, 4:29 p.m. UTC
This is a follow-on set for David Howells' recent patchset to rewrite
the fscache and cachefiles infrastructure. This re-enables fscache read
support in the ceph driver, and also adds support for writing to the
cache as well.

What's the best way to handle these, going forward? David, would it be
easier for you to carry these in your tree along with the rest of your
series?

Jeff Layton (2):
  ceph: conversion to new fscache API
  ceph: add fscache writeback support

 fs/ceph/Kconfig |   2 +-
 fs/ceph/addr.c  |  99 +++++++++++++++++++------
 fs/ceph/cache.c | 188 ++++++++++++++++++++----------------------------
 fs/ceph/cache.h |  98 +++++++++++++++++--------
 fs/ceph/caps.c  |   3 +-
 fs/ceph/file.c  |  13 +++-
 fs/ceph/inode.c |  22 ++++--
 fs/ceph/super.c |  10 +--
 fs/ceph/super.h |   2 +-
 9 files changed, 255 insertions(+), 182 deletions(-)

Comments

Jeff Layton Dec. 1, 2021, 11:31 a.m. UTC | #1
On Mon, 2021-11-29 at 16:46 +0000, David Howells wrote:
> Jeff Layton <jlayton@kernel.org> wrote:
> 
> > +void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci)
> >  {
> > -	return fscache_register_netfs(&ceph_cache_netfs);
> > +	struct fscache_cookie* cookie = xchg(&ci->fscache, NULL);
> > +
> > +	fscache_relinquish_cookie(cookie, false);
> >  }
> 
> xchg() should be excessive there.  This is only called from
> ceph_evict_inode().  Also, if you're going to reset the pointer, it might be
> worth poisoning it rather than nulling it.
> 

Ok, makes sense. I'll make that change soon.