From: Matthew Wilcox <willy@infradead.org>
To: Stephen Kitt <steve@sk2.org>
Cc: Jens Axboe <axboe@kernel.dk>, Jan Kara <jack@suse.cz>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Document genhd capability flags
Date: Fri, 6 Mar 2020 09:23:09 -0800 [thread overview]
Message-ID: <20200306172309.GD25710@bombadil.infradead.org> (raw)
In-Reply-To: <20200306171621.24134-1-steve@sk2.org>
On Fri, Mar 06, 2020 at 06:16:21PM +0100, Stephen Kitt wrote:
> 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.
Thank you! I have some suggestions for further improvement ...
> -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 hex word indicating which capabilities a specific
> +disk supports:
``capability`` is a bitfield, printed in hexadecimal, indicating ...
> + * ``GENHD_FL_UP`` (16): indicates that the block device is "up", with
> + * a similar meaning to network interfaces.
Since we're printing it in hex, the value here should be displayed in hex
to help the end-user. So ``GENHD_FL_UP`` (0x10), etc.
> #define GENHD_FL_REMOVABLE 1
> -/* 2 is unused */
> -#define GENHD_FL_MEDIA_CHANGE_NOTIFY 4
> +/* 2 is unused (used to be GENHD_FL_DRIVERFS) */
> +/* 4 is unused (used to be GENHD_FL_MEDIA_CHANGE_NOTIFY) */
> #define GENHD_FL_CD 8
> #define GENHD_FL_UP 16
> #define GENHD_FL_SUPPRESS_PARTITION_INFO 32
> -#define GENHD_FL_EXT_DEVT 64 /* allow extended devt */
> +#define GENHD_FL_EXT_DEVT 64
> #define GENHD_FL_NATIVE_CAPACITY 128
> #define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256
> #define GENHD_FL_NO_PART_SCAN 512
Maybe these should also be converted to hex to match?
next prev parent reply other threads:[~2020-03-06 17:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 17:16 Stephen Kitt
2020-03-06 17:23 ` Matthew Wilcox [this message]
2020-03-08 21:58 ` Stephen Kitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200306172309.GD25710@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=steve@sk2.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®