PR sync from: Li Lingfeng lilingfeng3@huawei.com
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/UEQI2SHGIUBCGQIX6SZUFI3UCGADA7K5/
Both writing a mounted device and writing part0 while mounting a
partition will provide a prompt message.

v1->v2:

  1. Replace BLK_DEV_DUMPINFO with BLK_DEV_WRITE_MOUNTED_QUIET, which is
    logically opposite;
  2. Make BLK_DEV_WRITE_MOUNTED_QUIET dependent on
    BLK_DEV_WRITE_MOUNTED, and decide whether to set bd_writers
    by BLK_DEV_WRITE_MOUNTED_QUIET;
  3. Move bdev_dump_info() into bdev_may_open();
  4. Add the cmdline interface to control whether to show info;
  5. Pass the state of "writes blocked" to part0 when mounting a
    partition.

Li Lingfeng (3):
block: Add config to show info about opening a mounted device for
write
block: detect confilt of write and mount between partitions and part0
block: show info of confilt of write and mount between partitions and
part0

--
2.31.1

#I8S3GW:[OLK 6.6]挂载文件系统的裸盘操作打印增强