All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] [PATCH] virtio-blk: document that the capacity field can change
@ 2022-03-01 12:00 Stefan Hajnoczi
  2022-03-01 12:46 ` [virtio-dev] " Michael S. Tsirkin
  2022-03-01 13:42 ` Stefan Hajnoczi
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2022-03-01 12:00 UTC (permalink / raw)
  To: virtio-dev; +Cc: Michael S. Tsirkin, Stefan Hajnoczi

Block devices can change size during operation. A configuration change
notification is sent by the device and the driver detects that the field
has changed. Document this behavior that has already been implemented in
Linux and QEMU since 2011.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 content.tex | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/content.tex b/content.tex
index c6f116c..96d2aa9 100644
--- a/content.tex
+++ b/content.tex
@@ -4863,6 +4863,9 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 
 \drivernormative{\subsubsection}{Device Operation}{Device Types / Block Device / Device Operation}
 
+The driver SHOULD check if the content of the \field{capacity} field has
+changed upon receiving a configuration change notification.
+
 A driver MUST NOT submit a request which would cause a read or write
 beyond \field{capacity}.
 
@@ -4909,6 +4912,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
 
 \devicenormative{\subsubsection}{Device Operation}{Device Types / Block Device / Device Operation}
 
+The device MAY change the content of the \field{capacity} field during
+operation of the device. When this happens, the device SHOULD trigger a
+configuration change notification.
+
 A device MUST set the \field{status} byte to VIRTIO_BLK_S_IOERR
 for a write request if the VIRTIO_BLK_F_RO feature if offered, and MUST NOT
 write any data.
-- 
2.35.1


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [virtio-dev] Re: [PATCH] virtio-blk: document that the capacity field can change
  2022-03-01 12:00 [virtio-dev] [PATCH] virtio-blk: document that the capacity field can change Stefan Hajnoczi
@ 2022-03-01 12:46 ` Michael S. Tsirkin
  2022-03-01 13:42 ` Stefan Hajnoczi
  1 sibling, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2022-03-01 12:46 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: virtio-dev

On Tue, Mar 01, 2022 at 12:00:21PM +0000, Stefan Hajnoczi wrote:
> Block devices can change size during operation. A configuration change
> notification is sent by the device and the driver detects that the field
> has changed. Document this behavior that has already been implemented in
> Linux and QEMU since 2011.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

github issue so we can track this?

> ---
>  content.tex | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/content.tex b/content.tex
> index c6f116c..96d2aa9 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -4863,6 +4863,9 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
>  
>  \drivernormative{\subsubsection}{Device Operation}{Device Types / Block Device / Device Operation}
>  
> +The driver SHOULD check if the content of the \field{capacity} field has
> +changed upon receiving a configuration change notification.
> +
>  A driver MUST NOT submit a request which would cause a read or write
>  beyond \field{capacity}.
>  
> @@ -4909,6 +4912,10 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope
>  
>  \devicenormative{\subsubsection}{Device Operation}{Device Types / Block Device / Device Operation}
>  
> +The device MAY change the content of the \field{capacity} field during
> +operation of the device. When this happens, the device SHOULD trigger a
> +configuration change notification.
> +
>  A device MUST set the \field{status} byte to VIRTIO_BLK_S_IOERR
>  for a write request if the VIRTIO_BLK_F_RO feature if offered, and MUST NOT
>  write any data.
> -- 
> 2.35.1


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [virtio-dev] Re: [PATCH] virtio-blk: document that the capacity field can change
  2022-03-01 12:00 [virtio-dev] [PATCH] virtio-blk: document that the capacity field can change Stefan Hajnoczi
  2022-03-01 12:46 ` [virtio-dev] " Michael S. Tsirkin
@ 2022-03-01 13:42 ` Stefan Hajnoczi
  2022-03-01 13:45   ` Michael S. Tsirkin
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2022-03-01 13:42 UTC (permalink / raw)
  To: virtio-dev; +Cc: Michael S. Tsirkin

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

On Tue, Mar 01, 2022 at 12:00:21PM +0000, Stefan Hajnoczi wrote:
> Block devices can change size during operation. A configuration change
> notification is sent by the device and the driver detects that the field
> has changed. Document this behavior that has already been implemented in
> Linux and QEMU since 2011.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  content.tex | 7 +++++++
>  1 file changed, 7 insertions(+)

Requesting a vote.

Fixes: https://github.com/oasis-tcs/virtio-spec/issues/136

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [virtio-dev] Re: [PATCH] virtio-blk: document that the capacity field can change
  2022-03-01 13:42 ` Stefan Hajnoczi
@ 2022-03-01 13:45   ` Michael S. Tsirkin
  2022-03-01 16:37     ` Stefan Hajnoczi
  0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2022-03-01 13:45 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: virtio-dev

On Tue, Mar 01, 2022 at 01:42:15PM +0000, Stefan Hajnoczi wrote:
> On Tue, Mar 01, 2022 at 12:00:21PM +0000, Stefan Hajnoczi wrote:
> > Block devices can change size during operation. A configuration change
> > notification is sent by the device and the driver detects that the field
> > has changed. Document this behavior that has already been implemented in
> > Linux and QEMU since 2011.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >  content.tex | 7 +++++++
> >  1 file changed, 7 insertions(+)
> 
> Requesting a vote.
> 
> Fixes: https://github.com/oasis-tcs/virtio-spec/issues/136

We can vote but not for 1.2 unless it's urgent (i.e. a regression), and
I think we can wait with this one.


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [virtio-dev] Re: [PATCH] virtio-blk: document that the capacity field can change
  2022-03-01 13:45   ` Michael S. Tsirkin
@ 2022-03-01 16:37     ` Stefan Hajnoczi
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2022-03-01 16:37 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: virtio-dev

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

On Tue, Mar 01, 2022 at 08:45:31AM -0500, Michael S. Tsirkin wrote:
> On Tue, Mar 01, 2022 at 01:42:15PM +0000, Stefan Hajnoczi wrote:
> > On Tue, Mar 01, 2022 at 12:00:21PM +0000, Stefan Hajnoczi wrote:
> > > Block devices can change size during operation. A configuration change
> > > notification is sent by the device and the driver detects that the field
> > > has changed. Document this behavior that has already been implemented in
> > > Linux and QEMU since 2011.
> > > 
> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > > ---
> > >  content.tex | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > 
> > Requesting a vote.
> > 
> > Fixes: https://github.com/oasis-tcs/virtio-spec/issues/136
> 
> We can vote but not for 1.2 unless it's urgent (i.e. a regression), and
> I think we can wait with this one.

I agree, it's not urgent. It can wait for 1.3.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-01 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 12:00 [virtio-dev] [PATCH] virtio-blk: document that the capacity field can change Stefan Hajnoczi
2022-03-01 12:46 ` [virtio-dev] " Michael S. Tsirkin
2022-03-01 13:42 ` Stefan Hajnoczi
2022-03-01 13:45   ` Michael S. Tsirkin
2022-03-01 16:37     ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.