Re: [PATCH 1/6] block: Add config option to not allow writing to mounted devices

Eric Biggers
2023-07-04T16:53:35Z

On Tue, Jul 04, 2023 at 11:56:44AM -0400, Colin Walters wrote:
> > +/* open is exclusive wrt all other BLK_OPEN_WRITE opens to the device */
> > +#define BLK_OPEN_BLOCK_WRITES ((__force blk_mode_t)(1 << 5))
>
> Bikeshed but: I think BLK and BLOCK "stutter" here. The doc comment already
> uses the term "exclusive" so how about BLK_OPEN_EXCLUSIVE ?

Yeah, using "block" in two different ways at the same time is confusing.
BLK_OPEN_EXCLUSIVE would probably be good, as would something like
BLK_OPEN_RESTRICT_WRITES.

I can't figure out how to apply this patch series, so I can't really see it in
context though.

- Eric