Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-07-15 Thread Jason Wang


在 2021/7/15 下午5:47, Yury Kamenev 写道:

Signed-off-by: Yury Kamenev 



I think we need a better commit log here.

And why do we need a Kconfig for this? If there's a good reason, I guess 
the right approach is to invent something in the virtio core (via /sys)?


Thanks



---
  .../admin-guide/kernel-parameters.txt |  3 +++
  drivers/block/Kconfig |  7 +
  drivers/block/virtio_blk.c| 26 +++
  include/uapi/linux/virtio_blk.h   |  2 ++
  4 files changed, 38 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt 
b/Documentation/admin-guide/kernel-parameters.txt
index bdb22006f713..941bdaf5c167 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6076,6 +6076,9 @@
brightness level.
default: 1

+   virtiopartscan
+   Enable virtio block device partition scanning omission based on 
VIRTIO_BLK_F_NO_PART_SCAN feature flag.
+
virtio_mmio.device=
[VMMIO] Memory mapped virtio (platform) device.

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 63056cfd4b62..69ecd3fd7037 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -399,6 +399,13 @@ config VIRTIO_BLK
  This is the virtual block driver for virtio.  It can be used with
QEMU based VMMs (like KVM or Xen).  Say Y or M.

+config VIRTIO_BLK_NO_PART_SCAN
+   bool "Disable partition scanning for devices with no partitions"
+   depends on VIRTIO_BLK
+   help
+ Disable partition scanning for devices with no partitions.
+ Can reduce the kernel start time for tiny systems like squashfs 
images.
+
  config BLK_DEV_RBD
tristate "Rados block device (RBD)"
depends on INET && BLOCK
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 4b49df2dfd23..479711d3791c 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -692,6 +692,19 @@ static const struct blk_mq_ops virtio_mq_ops = {
  static unsigned int virtblk_queue_depth;
  module_param_named(queue_depth, virtblk_queue_depth, uint, 0444);

+#ifndef MODULE
+#ifdef CONFIG_VIRTIO_BLK_NO_PART_SCAN
+static int partitions_scanning_disable __read_mostly;
+
+static int __init partitions_scanning_setup(char *__unused)
+{
+   partitions_scanning_disable = 1;
+   return 1;
+}
+__setup("nopartscan", partitions_scanning_setup);
+#endif
+#endif
+
  static int virtblk_probe(struct virtio_device *vdev)
  {
struct virtio_blk *vblk;
@@ -790,6 +803,13 @@ static int virtblk_probe(struct virtio_device *vdev)
vblk->disk->flags |= GENHD_FL_EXT_DEVT;
vblk->index = index;

+#ifdef CONFIG_VIRTIO_BLK_NO_PART_SCAN
+   if (unlikely(partitions_scanning_disable))
+   /* disable partitions scanning if it was stated in virtio 
features*/
+   if (virtio_has_feature(vdev, VIRTIO_BLK_F_NO_PART_SCAN))
+   vblk->disk->flags |= GENHD_FL_NO_PART_SCAN;
+#endif
+
/* configure queue flush support */
virtblk_update_cache_mode(vdev);

@@ -966,6 +986,9 @@ static unsigned int features_legacy[] = {
VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE,
VIRTIO_BLK_F_MQ, VIRTIO_BLK_F_DISCARD, VIRTIO_BLK_F_WRITE_ZEROES,
+#ifdef CONFIG_VIRTIO_BLK_NO_PART_SCAN
+   VIRTIO_BLK_F_NO_PART_SCAN,
+#endif
  }
  ;
  static unsigned int features[] = {
@@ -973,6 +996,9 @@ static unsigned int features[] = {
VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE,
VIRTIO_BLK_F_MQ, VIRTIO_BLK_F_DISCARD, VIRTIO_BLK_F_WRITE_ZEROES,
+#ifdef CONFIG_VIRTIO_BLK_NO_PART_SCAN
+   VIRTIO_BLK_F_NO_PART_SCAN,
+#endif
  };

  static struct virtio_driver virtio_blk = {
diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h
index d888f013d9ff..9b381675342a 100644
--- a/include/uapi/linux/virtio_blk.h
+++ b/include/uapi/linux/virtio_blk.h
@@ -40,6 +40,7 @@
  #define VIRTIO_BLK_F_MQ   12  /* support more than one vq */
  #define VIRTIO_BLK_F_DISCARD  13  /* DISCARD is supported */
  #define VIRTIO_BLK_F_WRITE_ZEROES 14  /* WRITE ZEROES is supported */
+#define VIRTIO_BLK_F_NO_PART_SCAN  16  /* Disable partition scanning */

  /* Legacy feature bits */
  #ifndef VIRTIO_BLK_NO_LEGACY
--
2.24.3 (Apple Git-128)



___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-07-15 Thread kernel test robot
Hi Yury,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on vhost/linux-next hch-configfs/for-next linus/master 
v5.14-rc1 next-20210715]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Yury-Kamenev/virtio-disable-partitions-scanning-for-no-partitions-block/20210715-175107
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
for-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://github.com/0day-ci/linux/commit/b5b35e33f22266b3905186a005992d54ae71e51b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Yury-Kamenev/virtio-disable-partitions-scanning-for-no-partitions-block/20210715-175107
git checkout b5b35e33f22266b3905186a005992d54ae71e51b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross 
O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/block/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/block/virtio_blk.c:3:
   drivers/block/virtio_blk.c: In function 'virtblk_probe':
>> drivers/block/virtio_blk.c:807:15: error: 'partitions_scanning_disable' 
>> undeclared (first use in this function)
 807 |  if (unlikely(partitions_scanning_disable))
 |   ^~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
  78 | # define unlikely(x) __builtin_expect(!!(x), 0)
 |  ^
   drivers/block/virtio_blk.c:807:15: note: each undeclared identifier is 
reported only once for each function it appears in
 807 |  if (unlikely(partitions_scanning_disable))
 |   ^~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
  78 | # define unlikely(x) __builtin_expect(!!(x), 0)
 |  ^


vim +/partitions_scanning_disable +807 drivers/block/virtio_blk.c

   707  
   708  static int virtblk_probe(struct virtio_device *vdev)
   709  {
   710  struct virtio_blk *vblk;
   711  struct request_queue *q;
   712  int err, index;
   713  
   714  u32 v, blk_size, max_size, sg_elems, opt_io_size;
   715  u16 min_io_size;
   716  u8 physical_block_exp, alignment_offset;
   717  unsigned int queue_depth;
   718  
   719  if (!vdev->config->get) {
   720  dev_err(&vdev->dev, "%s failure: config access 
disabled\n",
   721  __func__);
   722  return -EINVAL;
   723  }
   724  
   725  err = ida_simple_get(&vd_index_ida, 0, minor_to_index(1 << 
MINORBITS),
   726   GFP_KERNEL);
   727  if (err < 0)
   728  goto out;
   729  index = err;
   730  
   731  /* We need to know how many segments before we allocate. */
   732  err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SEG_MAX,
   733 struct virtio_blk_config, seg_max,
   734 &sg_elems);
   735  
   736  /* We need at least one SG element, whatever they say. */
   737  if (err || !sg_elems)
   738  sg_elems = 1;
   739  
   740  /* Prevent integer overflows and honor max vq size */
   741  sg_elems = min_t(u32, sg_elems, VIRTIO_BLK_MAX_SG_ELEMS - 2);
   742  
   743  /* We need extra sg elements at head and tail. */
   744  sg_elems += 2;
   745  vdev->priv = vblk = kmalloc(sizeof(*vblk), GFP_KERNEL);
   746  if (!vblk) {
   747  err = -ENOMEM;
   748  goto out_free_index;
   749  }
   750  
   751  /* This reference is dropped in virtblk_remove(). */
   752  refcount_set(&vblk->refs, 1);
   753  mutex_init(&vblk->vdev_mutex);
   754  
   755  vblk->vdev = vdev;
   756  vblk->sg_elems = sg_elems;
   757  
   758  INIT_WORK(&vblk->config_work, virtblk_config_changed_work);
   759  
   760  err = init_vq(vblk);
   761

Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-07-15 Thread Paolo Bonzini

On 15/07/21 11:47, Yury Kamenev wrote:

+#ifdef CONFIG_VIRTIO_BLK_NO_PART_SCAN
+   if (unlikely(partitions_scanning_disable))
+   /* disable partitions scanning if it was stated in virtio 
features*/
+   if (virtio_has_feature(vdev, VIRTIO_BLK_F_NO_PART_SCAN))
+   vblk->disk->flags |= GENHD_FL_NO_PART_SCAN;
+#endif
+


Has this been added to the spec?  It doesn't seem like a good idea, as 
pointed out by Stefan[1], Christoph[2] and myself[3].


Paolo

[1] 
https://lore.kernel.org/linux-block/20210524145654.ga2...@lst.de/T/#m2697cb41578490aad49ed1d8fa6604bf0924b54d
[2] 
https://lore.kernel.org/linux-block/20210524145654.ga2...@lst.de/T/#mc59329fd824102f94ac2f6b29fe94a652849aca0
[3] 
https://lore.kernel.org/linux-block/20210524145654.ga2...@lst.de/T/#mee6787c4fd87790b64feccc9e77fd5f618c2c336


___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-05-24 Thread Paolo Bonzini

On 24/05/21 21:34, Юрий Каменев wrote:

Hi

Is your goal to avoid accidentally detecting partitions because it's
confusing when that happens?

The main goal is reducing the kernel start time. It might be use useful 
in tiny systems that use, for example, squashfs images with certainly no 
partitions. Disabling partitions scanning for these images can save a 
few tens of milliseconds which can be a significant acceleration for 
starting such systems.


Perhaps that could be configured in the image, for example in the kernel 
command line?


Paolo


24.05.2021, 17:29, "Stefan Hajnoczi" :

On Thu, May 20, 2021 at 04:39:08PM +0300, Yury Kamenev wrote:

Hi,
Is there a VIRTIO spec change for the new VIRTIO_BLK_F_NO_PS feature
bit? Please send one:
https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback



GENHD_FL_NO_PART_SCAN is not used much in other drivers. This makes me
wonder if the same use case is addressed through other means with SCSI,
NVMe, etc devices. Maybe Christoph or Jens can weigh in on whether
adding a bit to disable partition scanning for a virtio-blk fits into
the big picture?

Is your goal to avoid accidentally detecting partitions because it's
confusing when that happens?

VIRTIO is currently undergoing auditing and changes to support untrusted
devices. From that perspective adding a device feature bit to disable
partition scanning does not help protect the guest from an untrusted
disk. The guest cannot trust the device, instead the guest itself would
need to be configured to avoid partition scanning of untrusted devices.

Stefan

  Signed-off-by: Yury Kamenev mailto:dam...@yandex-team.ru>>
  ---
   drivers/block/virtio_blk.c | 6 ++
   include/uapi/linux/virtio_blk.h | 1 +
   2 files changed, 7 insertions(+)

  diff --git a/drivers/block/virtio_blk.c
b/drivers/block/virtio_blk.c
  index b9fa3ef5b57c..17edcfee2208 100644
  --- a/drivers/block/virtio_blk.c
  +++ b/drivers/block/virtio_blk.c
  @@ -799,6 +799,10 @@ static int virtblk_probe(struct
virtio_device *vdev)
   vblk->disk->flags |= GENHD_FL_EXT_DEVT;
   vblk->index = index;

  + /*Disable partitions scanning for no-partitions block*/


Formatting cleanup and rephrasing:

   /* Disable partition scanning for devices with no partitions */

  + if (virtio_has_feature(vdev, VIRTIO_BLK_F_NO_PS))


I suggest user a more obvious name:

   VIRTIO_BLK_F_NO_PART_SCAN

  + vblk->disk->flags |= GENHD_FL_NO_PART_SCAN;
  +
   /* configure queue flush support */
   virtblk_update_cache_mode(vdev);

  @@ -977,6 +981,7 @@ static unsigned int features_legacy[] = {
   VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
   VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY,
VIRTIO_BLK_F_CONFIG_WCE,
   VIRTIO_BLK_F_MQ, VIRTIO_BLK_F_DISCARD,
VIRTIO_BLK_F_WRITE_ZEROES,
  + VIRTIO_BLK_F_NO_PS,
   }
   ;
   static unsigned int features[] = {
  @@ -984,6 +989,7 @@ static unsigned int features[] = {
   VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
   VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY,
VIRTIO_BLK_F_CONFIG_WCE,
   VIRTIO_BLK_F_MQ, VIRTIO_BLK_F_DISCARD,
VIRTIO_BLK_F_WRITE_ZEROES,
  + VIRTIO_BLK_F_NO_PS,
   };

   static struct virtio_driver virtio_blk = {
  diff --git a/include/uapi/linux/virtio_blk.h
b/include/uapi/linux/virtio_blk.h
  index d888f013d9ff..f197d07afb05 100644
  --- a/include/uapi/linux/virtio_blk.h
  +++ b/include/uapi/linux/virtio_blk.h
  @@ -40,6 +40,7 @@
   #define VIRTIO_BLK_F_MQ 12 /* support more than one vq */
   #define VIRTIO_BLK_F_DISCARD 13 /* DISCARD is supported */
   #define VIRTIO_BLK_F_WRITE_ZEROES 14 /* WRITE ZEROES is
supported */
  +#define VIRTIO_BLK_F_NO_PS 16 /* No partitions */

   /* Legacy feature bits */
   #ifndef VIRTIO_BLK_NO_LEGACY
  --
  2.24.3 (Apple Git-128)



___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-05-24 Thread Ulf Hansson
On Mon, 24 May 2021 at 16:57, Christoph Hellwig  wrote:
>
> On Mon, May 24, 2021 at 03:29:22PM +0100, Stefan Hajnoczi wrote:
> > GENHD_FL_NO_PART_SCAN is not used much in other drivers. This makes me
> > wonder if the same use case is addressed through other means with SCSI,
> > NVMe, etc devices. Maybe Christoph or Jens can weigh in on whether
> > adding a bit to disable partition scanning for a virtio-blk fits into
> > the big picture?
> >
> > Is your goal to avoid accidentally detecting partitions because it's
> > confusing when that happens?
>
> I'm really confused what the use case is here.  GENHD_FL_NO_PART_SCAN
> has four users:
>
>  - the block core setting it for hidden devices, for which the concept
>of paritions doesn't make sense.  Looking back this should have never
>used GENHD_FL_NO_PART_SCAN, and instead the partition scanning code
>should just check GENHD_FL_HIDDEN as well.
>  - mmc uses it for boot partitions and rpmb.  I'm not even sure how
>these can be exposed as block devices as they don't require block
>granularity access IIRC, but if the allow block layer access there
>is no reason to ever set these flags.

For RPMB, we have converted them into char devices, thus
GENHD_FL_NO_PART_SCAN is never set for them. The code needs a cleanup
to clarify this.

When it comes to eMMC boot partitions, those can be read/written to as
any other block device. Although, it's unlikely that they need
partitions as they are usually very small, 512Kb or 2MB in that
ballpark. At least, that was the thinking behind it when we added
GENHD_FL_NO_PART_SCAN for them.

If you want to drop GENHD_FL_NO_PART_SCAN for eMMC boot partitions, I
don't think it will be an issue.

>  - loop is a bit of a mess.  IIRC the story is that originally the
>loop device did not support partitions, then in 2008 support for
>partitions was added by partitioning the minor number space, and
>then in 2011 support for partitions without that parameter was
>added using a new flag in the loop device creation ioctl that uses
>the extended dev_t space added since.  But even that might be
>something we can handled without that flag without breaking the
>userspace ABI
>  - m64card sets it for no good reason at all
>
> In other words: in a perfect would GENHD_FL_NO_PART_SCAN would not
> exist, and it certainly should not be added to a new driver, never
> mind a protocol.
> ___
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Kind regards
Uffe
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-05-24 Thread Christoph Hellwig
On Mon, May 24, 2021 at 03:29:22PM +0100, Stefan Hajnoczi wrote:
> GENHD_FL_NO_PART_SCAN is not used much in other drivers. This makes me
> wonder if the same use case is addressed through other means with SCSI,
> NVMe, etc devices. Maybe Christoph or Jens can weigh in on whether
> adding a bit to disable partition scanning for a virtio-blk fits into
> the big picture?
> 
> Is your goal to avoid accidentally detecting partitions because it's
> confusing when that happens?

I'm really confused what the use case is here.  GENHD_FL_NO_PART_SCAN
has four users:

 - the block core setting it for hidden devices, for which the concept
   of paritions doesn't make sense.  Looking back this should have never
   used GENHD_FL_NO_PART_SCAN, and instead the partition scanning code
   should just check GENHD_FL_HIDDEN as well.
 - mmc uses it for boot partitions and rpmb.  I'm not even sure how
   these can be exposed as block devices as they don't require block
   granularity access IIRC, but if the allow block layer access there
   is no reason to ever set these flags.
 - loop is a bit of a mess.  IIRC the story is that originally the
   loop device did not support partitions, then in 2008 support for
   partitions was added by partitioning the minor number space, and
   then in 2011 support for partitions without that parameter was
   added using a new flag in the loop device creation ioctl that uses
   the extended dev_t space added since.  But even that might be
   something we can handled without that flag without breaking the
   userspace ABI
 - m64card sets it for no good reason at all

In other words: in a perfect would GENHD_FL_NO_PART_SCAN would not
exist, and it certainly should not be added to a new driver, never
mind a protocol.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block

2021-05-24 Thread Stefan Hajnoczi
On Thu, May 20, 2021 at 04:39:08PM +0300, Yury Kamenev wrote:

Hi,
Is there a VIRTIO spec change for the new VIRTIO_BLK_F_NO_PS feature
bit? Please send one:
https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio#feedback

GENHD_FL_NO_PART_SCAN is not used much in other drivers. This makes me
wonder if the same use case is addressed through other means with SCSI,
NVMe, etc devices. Maybe Christoph or Jens can weigh in on whether
adding a bit to disable partition scanning for a virtio-blk fits into
the big picture?

Is your goal to avoid accidentally detecting partitions because it's
confusing when that happens?

VIRTIO is currently undergoing auditing and changes to support untrusted
devices. From that perspective adding a device feature bit to disable
partition scanning does not help protect the guest from an untrusted
disk. The guest cannot trust the device, instead the guest itself would
need to be configured to avoid partition scanning of untrusted devices.

Stefan

> Signed-off-by: Yury Kamenev 
> ---
>  drivers/block/virtio_blk.c  | 6 ++
>  include/uapi/linux/virtio_blk.h | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index b9fa3ef5b57c..17edcfee2208 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -799,6 +799,10 @@ static int virtblk_probe(struct virtio_device *vdev)
>   vblk->disk->flags |= GENHD_FL_EXT_DEVT;
>   vblk->index = index;
>  
> + /*Disable partitions scanning for no-partitions block*/

Formatting cleanup and rephrasing:

  /* Disable partition scanning for devices with no partitions */

> + if (virtio_has_feature(vdev, VIRTIO_BLK_F_NO_PS))

I suggest user a more obvious name:

  VIRTIO_BLK_F_NO_PART_SCAN

> + vblk->disk->flags |= GENHD_FL_NO_PART_SCAN;
> +
>   /* configure queue flush support */
>   virtblk_update_cache_mode(vdev);
>  
> @@ -977,6 +981,7 @@ static unsigned int features_legacy[] = {
>   VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
>   VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE,
>   VIRTIO_BLK_F_MQ, VIRTIO_BLK_F_DISCARD, VIRTIO_BLK_F_WRITE_ZEROES,
> + VIRTIO_BLK_F_NO_PS,
>  }
>  ;
>  static unsigned int features[] = {
> @@ -984,6 +989,7 @@ static unsigned int features[] = {
>   VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE,
>   VIRTIO_BLK_F_FLUSH, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_CONFIG_WCE,
>   VIRTIO_BLK_F_MQ, VIRTIO_BLK_F_DISCARD, VIRTIO_BLK_F_WRITE_ZEROES,
> + VIRTIO_BLK_F_NO_PS,
>  };
>  
>  static struct virtio_driver virtio_blk = {
> diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h
> index d888f013d9ff..f197d07afb05 100644
> --- a/include/uapi/linux/virtio_blk.h
> +++ b/include/uapi/linux/virtio_blk.h
> @@ -40,6 +40,7 @@
>  #define VIRTIO_BLK_F_MQ  12  /* support more than one vq */
>  #define VIRTIO_BLK_F_DISCARD 13  /* DISCARD is supported */
>  #define VIRTIO_BLK_F_WRITE_ZEROES14  /* WRITE ZEROES is supported */
> +#define VIRTIO_BLK_F_NO_PS  16  /* No partitions */
>  
>  /* Legacy feature bits */
>  #ifndef VIRTIO_BLK_NO_LEGACY
> -- 
> 2.24.3 (Apple Git-128)
> 


signature.asc
Description: PGP signature
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization