Skip to content

CONFIG_DEBUG_VFS at last

Mateusz Guzik linux-fsdevel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyIn review
  2. v33 patches 1 replySuperseded
  3. v23 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches2 repliesSuperseded

Changes in v4 from the cover letter

- export dump_inode, fixes building ext4 as a module

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vfs: add initial support for CONFIG_DEBUG_VFSfs/inode.c include/linux/fs.h include/linux/vfsdebug.h +1 more+70 -01 reply
2/3vfs: catch invalid modes in may_open()fs/namei.c+2 -00 replies
3/3vfs: use the new debug macros in inode_set_cached_link()include/linux/fs.h+2 -130 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 0/3] CONFIG_DEBUG_VFS at last

This adds a super basic version just to get the mechanism going, along with sample usage.

The macro set is incomplete (e.g., lack of locking macros) and dump_inode routine fails to dump any state yet, to be implemented(tm).

I think despite the primitive state this is complete enough to start sprinkling asserts as necessary.

v4:
- export dump_inode, fixes building ext4 as a module

v3:
- move dump_inode to fs/inode.c
- s/failed/encountered/
- pr_warn instead of pr_crit, matches dump_mapping

v2:
- correct may_open
- fixed up condition reporting:
before:
VFS_WARN_ON_INODE(__builtin_choose_expr((sizeof(int) == sizeof(*(8 ? ((void *)((long)(__builtin_strlen(link)) * 0l)) : (int *)8))), __builtin_strlen(link), __fortify_strlen(link)) != linklen) failed for inode ff32f7c350c8aec8
after:
VFS_WARN_ON_INODE(strlen(link) != linklen) failed for inode ff2b81ddca13f338

Mateusz Guzik (3):
vfs: add initial support for CONFIG_DEBUG_VFS
vfs: catch invalid modes in may_open()
vfs: use the new debug macros in inode_set_cached_link()

 fs/inode.c               | 15 ++++++++++++++
 fs/namei.c               |  2 ++
 include/linux/fs.h       | 16 +++-----------
 include/linux/vfsdebug.h | 45 ++++++++++++++++++++++++++++++++++++++++
 lib/Kconfig.debug        |  9 ++++++++
 5 files changed, 74 insertions(+), 13 deletions(-)
 create mode 100644 include/linux/vfsdebug.h
Signature · 1 line
2.43.0