Document genhd capability flags
Subsystems (2)
PATCH v2 1/1 Document genhd capability flags
The kernel documentation includes a brief section about genhd capabilities, but it turns out that the only documented capability (GENHD_FL_MEDIA_CHANGE_NOTIFY) isn't used any more.
This patch removes that flag, and documents the rest, based on my understanding of the current uses of these flags in the kernel. The documentation is kept in the header file, alongside the declarations, in the hope that it will be kept up-to-date in future; the kernel documentation is changed to include the documentation generated from the header file.
Because the ultimate goal is to provide some end-user documentation (or end-administrator documentation), the comments are perhaps more user-oriented than might be expected. Since the values are shown to users in hexadecimal, the documentation lists them in hexadecimal, and the constant declarations are adjusted to match.
--- Documentation/block/capability.rst | 16 ++----- include/linux/genhd.h | 69 +++++++++++++++++++++++++----- 2 files changed, 62 insertions(+), 23 deletions(-)
Documentation/block/capability.rst +4 -12
@@ -2,17 +2,9 @@ Generic Block Device Capability =============================== -This file documents the sysfs file block/<disk>/capability +This file documents the sysfs file ``block/<disk>/capability``. -capability is a hex word indicating which capabilities a specific disk -supports. For more information on bits not listed here, see -include/linux/genhd.h +``capability`` is a bitfield, printed in hexadecimal, indicating which +capabilities a specific block device supports: -GENHD_FL_MEDIA_CHANGE_NOTIFY ----------------------------- - -Value: 4 - -When this bit is set, the disk supports Asynchronous Notification -of media change events. These events will be broadcast to user -space via kernel uevent. +.. kernel-doc:: include/linux/genhd.h
include/linux/genhd.h +58 -11
75 lines not on this page · raw message
base-commit: aeb542a1b5c507ea117d21c3e3e012ba16f065ac
Signature · 1 line
2.20.1
Quoted 11 lines · Stephen Kitt
The kernel documentation includes a brief section about genhd capabilities, but it turns out that the only documented capability (
GENHD_FL_MEDIA_CHANGE_NOTIFY) isn't used any more.This patch removes that flag, and documents the rest, based on my understanding of the current uses of these flags in the kernel. The documentation is kept in the header file, alongside the declarations, in the hope that it will be kept up-to-date in future; the kernel documentation is changed to include the documentation generated from the header file.
Quoted 7 lines
Because the ultimate goal is to provide some end-user documentation (or end-administrator documentation), the comments are perhaps more user-oriented than might be expected. Since the values are shown to users in hexadecimal, the documentation lists them in hexadecimal, and the constant declarations are adjusted to match.
Signed-off-by Stephen Kitt <[email protected]>
Quoted 11 lines · Stephen Kitt
The kernel documentation includes a brief section about genhd capabilities, but it turns out that the only documented capability (
GENHD_FL_MEDIA_CHANGE_NOTIFY) isn't used any more.This patch removes that flag, and documents the rest, based on my understanding of the current uses of these flags in the kernel. The documentation is kept in the header file, alongside the declarations, in the hope that it will be kept up-to-date in future; the kernel documentation is changed to include the documentation generated from the header file.
Quoted 5 lines
Because the ultimate goal is to provide some end-user documentation (or end-administrator documentation), the comments are perhaps more user-oriented than might be expected. Since the values are shown to users in hexadecimal, the documentation lists them in hexadecimal, and the constant declarations are adjusted to match.
Applied, thanks.
Signature · 1 line
Jens Axboe