Skip to content

RFC Superblock Notifications

Gabriel Krisman Bertazi linux-ext4 linux-fsdevel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest8 patches 0 repliesNew
  2. v1 RFC7 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8watch_queue: Make watch_sizeof() check record sizeinclude/linux/watch_queue.h+6 -10 replies
2/8security: Add hooks to rule on setting a watch for superblockinclude/linux/lsm_hook_defs.h include/linux/lsm_hooks.h include/linux/security.h +1 more+24 -00 replies
3/8watch_queue: Support a text field at the end of the notificationinclude/linux/watch_queue.h kernel/watch_queue.c+36 -70 replies
4/8vfs: Add superblock notificationsarch/x86/entry/syscalls/syscall_32.tbl arch/x86/entry/syscalls/syscall_64.tbl fs/Kconfig +6 more+269 -20 replies
5/8vfs: Include origin of the SB error notificationinclude/linux/fs.h include/uapi/linux/watch_queue.h+12 -20 replies
6/8fs: Add more superblock error subtypesinclude/linux/fs.h include/uapi/linux/watch_queue.h+73 -00 replies
7/8ext4: Implement SB error notification through watch_sbfs/ext4/super.c+23 -80 replies
8/8samples: watch_queue: Add sample of SB notificationssamples/watch_queue/Makefile samples/watch_queue/watch_sb.c+115 -10 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH RFC v2 0/8] Superblock Notifications

Hi,

This is a second RFC with an implementation to support superblock and specifically ext4 notifications over the watch_queue interface, as originally proposed by David Howells. The original cover letter follows.

This version of the RFC introduces the design changes requested by Ted on the previous version (thanks). It folds the _inode_error and _inode_warning types into their error and warning counterparts. This version also introduces a patch to samples/ exemplifying how the interface can be used.

I'm still sending it as an RFC as I'd love to gather a bit more feedback, before actually proposing it for merging.

Dave, can you comment on the changes to watch_queue and how it fits your original watch_queue model?

The reasoning for this work, and some background can be found in the cover letter below.

I also shared the patches at:

https://gitlab.collabora.com/krisman/linux.git

under the tag ext4-error-notifications_RFC-v2

Thanks,

---
Original cover letter:

Google has been using an out-of-tree mechanism for error notification in Ext4 and we decided it is time to push for an upstream solution. This would surely fit on top of David's notification work.

This patchset is an attempt to restart that discussion. It forward ports some code from David on top of Linus tree, adds features to watch_queue and implements ext4 support.

The new notifications are designed after ext4 messages, so it exposes notifications types to fit that filesystem, but it doesn't change much to other filesystems, so it should be easily extensible.

I'm aware of the discussion around fsinfo, but I'd like to ask if there are other missing pieces and what we could do to help that work go upstream. From a previous mailing list discussion, Linus complained about lack of users as a main reason for it to not be merged, so hey! :)

In addition, I'd like to ask for feedback on the current implementation, specifically regarding the passing of extra unformatted information at the end of the notification and the ext4 support.

The work, as shared on this patchset can be found at:

https://gitlab.collabora.com/krisman/linux.git -b ext4-error-notifications

And there is an example code at:

https://gitlab.collabora.com/krisman/ext4-watcher

I'm Cc'ing Khazhismel Kumykov, from Google, who can provide more information about their use case, if requested.
---

David Howells (3):
watch_queue: Make watch_sizeof() check record size
security: Add hooks to rule on setting a watch for superblock
vfs: Add superblock notifications

Gabriel Krisman Bertazi (5):
watch_queue: Support a text field at the end of the notification
vfs: Include origin of the SB error notification
fs: Add more superblock error subtypes
ext4: Implement SB error notification through watch_sb
samples: watch_queue: Add sample of SB notifications

 arch/x86/entry/syscalls/syscall_32.tbl |   1 +
 arch/x86/entry/syscalls/syscall_64.tbl |   1 +
 fs/Kconfig                             |  12 ++
 fs/ext4/super.c                        |  31 +++--
 fs/super.c                             | 127 +++++++++++++++++++++
 include/linux/fs.h                     | 150 +++++++++++++++++++++++++
 include/linux/lsm_hook_defs.h          |   1 +
 include/linux/lsm_hooks.h              |   4 +
 include/linux/security.h               |  13 +++
 include/linux/syscalls.h               |   2 +
 include/linux/watch_queue.h            |  21 +++-
 include/uapi/asm-generic/unistd.h      |   4 +-
 include/uapi/linux/watch_queue.h       |  54 ++++++++-
 kernel/sys_ni.c                        |   3 +
 kernel/watch_queue.c                   |  29 ++++-
 samples/watch_queue/Makefile           |   2 +-
 samples/watch_queue/watch_sb.c         | 114 +++++++++++++++++++
 security/security.c                    |   6 +
 18 files changed, 556 insertions(+), 19 deletions(-)
 create mode 100644 samples/watch_queue/watch_sb.c
Signature · 1 line
2.29.2