[PATCH v2 00/15] ceph: add binary logging (BLOG) for CephFS
Alex Markuze <[email protected]> Mon, 6 Jul 2026 14:38:28 +0000
| Newsgroups | org.kernel.vger.ceph-devel |
|---|---|
| Message-ID | <[email protected]> |
Add a lightweight binary logging subsystem for CephFS that replaces the
existing dout/doutc text-based debug logging with a binary-serialized
format. Log entries are stored in per-task 128KB page-fragment buffers
and exposed through debugfs for offline analysis.
Changes since v1 (based on review from Xiubo Li, thanks):
- 01/15: populate public headers with struct definitions and API
declarations; v1 shipped them as empty 0-byte files making the
series unbuildable at every commit boundary
- 02/15: blog_des.c: pr_err → pr_err_ratelimited (debugfs read path
is user-triggerable), -EFAULT → -EBADMSG for bad serialized data,
fix snprintf truncation off-by-one when ret >= remaining, extract
des_advance() helper to deduplicate the snprintf+advance pattern
- 07/15: linux/sched.h now included via the populated blog.h header
chain, fixing the implicit dependency on `current`
- 10/15: remove unnecessary IS_ENABLED(CONFIG_CEPH_FS) guards around
ceph_blog_debugfs_init/cleanup in debugfs.c — this is CephFS-only
code where CONFIG_CEPH_FS is always true
Alex Markuze (15):
ceph: add BLOG public headers
ceph: add BLOG deserialization support
ceph: add BLOG page-fragment allocator
ceph: add BLOG magazine batch allocator
ceph: add BLOG logger core
ceph: add BLOG per-module context management
ceph: add Ceph BLOG scaffolding
ceph: add bout and boutc wrappers for BLOG
ceph: switch MDS request plumbing to struct ceph_journal_info
ceph: add BLOG debugfs interface
ceph: convert VFS inode and directory paths to bout
ceph: convert VFS data I/O paths to bout
ceph: convert capability and snapshot paths to bout
ceph: convert remaining helper paths to bout
selftests: add Ceph BLOG smoke test and collection helpers
MAINTAINERS | 1 +
fs/ceph/Makefile | 6 +
fs/ceph/addr.c | 168 ++---
fs/ceph/blog_batch.c | 312 ++++++++++
fs/ceph/blog_client.c | 266 ++++++++
fs/ceph/blog_core.c | 424 +++++++++++++
fs/ceph/blog_debugfs.c | 434 +++++++++++++
fs/ceph/blog_des.c | 332 ++++++++++
fs/ceph/blog_module.c | 584 ++++++++++++++++++
fs/ceph/blog_pagefrag.c | 95 +++
fs/ceph/caps.c | 252 ++++----
fs/ceph/crypto.c | 14 +-
fs/ceph/debugfs.c | 19 +-
fs/ceph/dir.c | 290 ++++++---
fs/ceph/export.c | 83 ++-
fs/ceph/file.c | 274 +++++---
fs/ceph/inode.c | 233 ++++---
fs/ceph/ioctl.c | 6 +-
fs/ceph/locks.c | 66 +-
fs/ceph/mds_client.c | 293 ++++-----
fs/ceph/mdsmap.c | 8 +-
fs/ceph/quota.c | 2 +-
fs/ceph/snap.c | 66 +-
fs/ceph/super.c | 58 +-
fs/ceph/super.h | 5 +
fs/ceph/xattr.c | 88 ++-
include/linux/ceph/blog.h | 196 ++++++
include/linux/ceph/blog_batch.h | 44 ++
include/linux/ceph/blog_des.h | 16 +
include/linux/ceph/blog_module.h | 91 +++
include/linux/ceph/blog_pagefrag.h | 32 +
include/linux/ceph/blog_ser.h | 270 ++++++++
include/linux/ceph/ceph_blog.h | 284 +++++++++
include/linux/ceph/ceph_debug.h | 44 +-
include/linux/ceph/libceph.h | 2 +
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/ceph_blog/Makefile | 7 +
.../selftests/ceph_blog/blog_analyze.sh | 124 ++++
.../selftests/ceph_blog/blog_collect.sh | 116 ++++
.../selftests/ceph_blog/blog_smoke_test.sh | 363 +++++++++++
tools/testing/selftests/ceph_blog/config | 2 +
41 files changed, 5218 insertions(+), 753 deletions(-)
create mode 100644 fs/ceph/blog_batch.c
create mode 100644 fs/ceph/blog_client.c
create mode 100644 fs/ceph/blog_core.c
create mode 100644 fs/ceph/blog_debugfs.c
create mode 100644 fs/ceph/blog_des.c
create mode 100644 fs/ceph/blog_module.c
create mode 100644 fs/ceph/blog_pagefrag.c
create mode 100644 include/linux/ceph/blog.h
create mode 100644 include/linux/ceph/blog_batch.h
create mode 100644 include/linux/ceph/blog_des.h
create mode 100644 include/linux/ceph/blog_module.h
create mode 100644 include/linux/ceph/blog_pagefrag.h
create mode 100644 include/linux/ceph/blog_ser.h
create mode 100644 include/linux/ceph/ceph_blog.h
create mode 100644 tools/testing/selftests/ceph_blog/Makefile
create mode 100644 tools/testing/selftests/ceph_blog/blog_analyze.sh
create mode 100644 tools/testing/selftests/ceph_blog/blog_collect.sh
create mode 100644 tools/testing/selftests/ceph_blog/blog_smoke_test.sh
create mode 100644 tools/testing/selftests/ceph_blog/config
--
2.34.1