Skip to content

RFC ceph: convert to new FSCache API

Jeff Layton ceph-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest11 patches 7 repliesIn review
  2. v1 RFC11 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11ceph: break out writeback of incompatible snap context to separate functionfs/ceph/addr.c+60 -360 replies
2/11ceph: don't call ceph_update_writeable_page from page_mkwritefs/ceph/addr.c+18 -30 replies
3/11ceph: fold ceph_sync_readpages into ceph_readpagefs/ceph/addr.c+25 -540 replies
4/11ceph: fold ceph_sync_writepages into writepage_nounlockfs/ceph/addr.c+35 -580 replies
5/11ceph: fold ceph_update_writeable_page into ceph_write_beginfs/ceph/addr.c+62 -790 replies
6/11ceph: conversion to new fscache APIfs/ceph/addr.c fs/ceph/cache.c fs/ceph/cache.h +4 more+135 -3470 replies
7/11ceph: convert readpage to fscache read helperfs/ceph/Kconfig fs/ceph/addr.c+196 -100 replies
8/11ceph: plug write_begin into read helperfs/ceph/addr.c+132 -1210 replies
9/11ceph: convert readpages to fscache_read_helperfs/ceph/addr.c+28 -1817 replies
10/11ceph: add fscache writeback supportfs/ceph/addr.c+116 -60 replies
11/11ceph: re-enable fscache supportfs/ceph/Kconfig+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 00/11] ceph: convert to new FSCache API

This patchset converts ceph to use the new (not yet merged) FSCache API. Trying to use fscache+ceph today usually results in oopses. With this series, it seems to be quite stable.

Where possible, I've converted the code to use the new read helper, which hides away a lot of the gory details of page handling, which I think makes the resulting code clearer than it was.

It starts with a few cleanup/reorganization patches to prepare the code. I then rip out most of the old ceph fscache helpers and replace them with new ones for the new API.

The rest of the series then plugs buffered read/write caching support back into the code, with the most of the read-side routines using the fscache_read_helper.

This passes xfstests' quick group run with the cache disabled. With it enabled, it passed most of it, but I hit some OOM kills on generic/531. Still tracking that bit down, but we suspect the problem is in fscache/cachefiles code and not in these patches.

This is based on top of David's latest fscache-iter branch:

https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-iter

...my branch is here:

https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/log/?h=ceph-fscache-iter

Jeff Layton (11):
ceph: break out writeback of incompatible snap context to separate
function
ceph: don't call ceph_update_writeable_page from page_mkwrite
ceph: fold ceph_sync_readpages into ceph_readpage
ceph: fold ceph_sync_writepages into writepage_nounlock
ceph: fold ceph_update_writeable_page into ceph_write_begin
ceph: conversion to new fscache API
ceph: convert readpage to fscache read helper
ceph: plug write_begin into read helper
ceph: convert readpages to fscache_read_helper
ceph: add fscache writeback support
ceph: re-enable fscache support

 fs/ceph/Kconfig |   4 +-
 fs/ceph/addr.c  | 939 +++++++++++++++++++++++++++---------------------
 fs/ceph/cache.c | 290 ++++-----------
 fs/ceph/cache.h | 106 ++----
 fs/ceph/caps.c  |  11 +-
 fs/ceph/file.c  |  13 +-
 fs/ceph/inode.c |  14 +-
 fs/ceph/super.h |   1 -
 8 files changed, 645 insertions(+), 733 deletions(-)
Signature · 1 line
2.26.2