All of lore.kernel.org
 help / color / mirror / Atom feed
* blkif discard attributes
@ 2014-07-03  7:59 Jan Beulich
  2014-07-03  9:43 ` David Vrabel
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2014-07-03  7:59 UTC (permalink / raw)
  To: David Vrabel, Boris Ostrovsky, Konrad Rzeszutek Wilk; +Cc: xen-devel

All (short of there being a specific blkfront/blkback maintainer),

it just occurred to me - shouldn't Linux'es max_discard_sectors and
discard_zeroes_data also be communicated from backend to frontend?

Thanks, Jan

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

* Re: blkif discard attributes
  2014-07-03  7:59 blkif discard attributes Jan Beulich
@ 2014-07-03  9:43 ` David Vrabel
  2014-07-03 10:08   ` Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: David Vrabel @ 2014-07-03  9:43 UTC (permalink / raw)
  To: Jan Beulich, Boris Ostrovsky, Konrad Rzeszutek Wilk; +Cc: xen-devel

On 03/07/14 08:59, Jan Beulich wrote:
> All (short of there being a specific blkfront/blkback maintainer),
> 
> it just occurred to me - shouldn't Linux'es max_discard_sectors and

The backend could split oversized discard requests into several smaller
ones.

> discard_zeroes_data also be communicated from backend to frontend?

Perhaps. But how would you handle a guest that used to have
discard_zeroes_data but is restored with different storage that no
longer has this property?

David

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

* Re: blkif discard attributes
  2014-07-03  9:43 ` David Vrabel
@ 2014-07-03 10:08   ` Jan Beulich
  2014-07-03 10:17     ` David Vrabel
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2014-07-03 10:08 UTC (permalink / raw)
  To: David Vrabel; +Cc: xen-devel, Boris Ostrovsky

>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
> On 03/07/14 08:59, Jan Beulich wrote:
>> discard_zeroes_data also be communicated from backend to frontend?
> 
> Perhaps. But how would you handle a guest that used to have
> discard_zeroes_data but is restored with different storage that no
> longer has this property?

Don't these attributes gets re-evaluated after restore anyway?

Jan

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

* Re: blkif discard attributes
  2014-07-03 10:08   ` Jan Beulich
@ 2014-07-03 10:17     ` David Vrabel
  2014-07-03 10:24       ` Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: David Vrabel @ 2014-07-03 10:17 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Boris Ostrovsky

On 03/07/14 11:08, Jan Beulich wrote:
>>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
>> On 03/07/14 08:59, Jan Beulich wrote:
>>> discard_zeroes_data also be communicated from backend to frontend?
>>
>> Perhaps. But how would you handle a guest that used to have
>> discard_zeroes_data but is restored with different storage that no
>> longer has this property?
> 
> Don't these attributes gets re-evaluated after restore anyway?

I don't see how that helps.  What if a discard request was submitted
before the suspend, expecting the discard to zero and on restore the
requests is queued for the new backend which then might not zero.

David

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

* Re: blkif discard attributes
  2014-07-03 10:17     ` David Vrabel
@ 2014-07-03 10:24       ` Jan Beulich
  2014-07-07 18:40         ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2014-07-03 10:24 UTC (permalink / raw)
  To: David Vrabel; +Cc: xen-devel, Boris Ostrovsky

>>> On 03.07.14 at 12:17, <david.vrabel@citrix.com> wrote:
> On 03/07/14 11:08, Jan Beulich wrote:
>>>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
>>> On 03/07/14 08:59, Jan Beulich wrote:
>>>> discard_zeroes_data also be communicated from backend to frontend?
>>>
>>> Perhaps. But how would you handle a guest that used to have
>>> discard_zeroes_data but is restored with different storage that no
>>> longer has this property?
>> 
>> Don't these attributes gets re-evaluated after restore anyway?
> 
> I don't see how that helps.  What if a discard request was submitted
> before the suspend, expecting the discard to zero and on restore the
> requests is queued for the new backend which then might not zero.

Hmm, good point. So it's then indeed better to not communicate this.
Albeit similar issues arise with the existing attributes we communicate:
What if the new backend doesn't satisfy the assumptions on the old
one? Possibly the request may get failed, but possibly it may also get
executed wrongly. Neither of which is very desirable.

Jan

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

* Re: blkif discard attributes
  2014-07-03 10:24       ` Jan Beulich
@ 2014-07-07 18:40         ` Konrad Rzeszutek Wilk
  2014-07-14  9:07           ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-07-07 18:40 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Boris Ostrovsky, David Vrabel

On Thu, Jul 03, 2014 at 11:24:30AM +0100, Jan Beulich wrote:
> >>> On 03.07.14 at 12:17, <david.vrabel@citrix.com> wrote:
> > On 03/07/14 11:08, Jan Beulich wrote:
> >>>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
> >>> On 03/07/14 08:59, Jan Beulich wrote:
> >>>> discard_zeroes_data also be communicated from backend to frontend?
> >>>
> >>> Perhaps. But how would you handle a guest that used to have
> >>> discard_zeroes_data but is restored with different storage that no
> >>> longer has this property?
> >> 
> >> Don't these attributes gets re-evaluated after restore anyway?
> > 
> > I don't see how that helps.  What if a discard request was submitted
> > before the suspend, expecting the discard to zero and on restore the
> > requests is queued for the new backend which then might not zero.
> 
> Hmm, good point. So it's then indeed better to not communicate this.
> Albeit similar issues arise with the existing attributes we communicate:
> What if the new backend doesn't satisfy the assumptions on the old
> one? Possibly the request may get failed, but possibly it may also get
> executed wrongly. Neither of which is very desirable.

That is OK with discard operations. It is OK if they fail intermediately.
> 
> Jan
> 

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

* Re: blkif discard attributes
  2014-07-07 18:40         ` Konrad Rzeszutek Wilk
@ 2014-07-14  9:07           ` Ian Campbell
  2014-07-15 16:48             ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-07-14  9:07 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, Jan Beulich

On Mon, 2014-07-07 at 14:40 -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Jul 03, 2014 at 11:24:30AM +0100, Jan Beulich wrote:
> > >>> On 03.07.14 at 12:17, <david.vrabel@citrix.com> wrote:
> > > On 03/07/14 11:08, Jan Beulich wrote:
> > >>>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
> > >>> On 03/07/14 08:59, Jan Beulich wrote:
> > >>>> discard_zeroes_data also be communicated from backend to frontend?
> > >>>
> > >>> Perhaps. But how would you handle a guest that used to have
> > >>> discard_zeroes_data but is restored with different storage that no
> > >>> longer has this property?
> > >> 
> > >> Don't these attributes gets re-evaluated after restore anyway?
> > > 
> > > I don't see how that helps.  What if a discard request was submitted
> > > before the suspend, expecting the discard to zero and on restore the
> > > requests is queued for the new backend which then might not zero.
> > 
> > Hmm, good point. So it's then indeed better to not communicate this.
> > Albeit similar issues arise with the existing attributes we communicate:
> > What if the new backend doesn't satisfy the assumptions on the old
> > one? Possibly the request may get failed, but possibly it may also get
> > executed wrongly. Neither of which is very desirable.
> 
> That is OK with discard operations. It is OK if they fail intermediately.

Are there not security implications to failing a discard? Or do the
interfaces not make that promise to the higher layers?

Ian.

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

* Re: blkif discard attributes
  2014-07-14  9:07           ` Ian Campbell
@ 2014-07-15 16:48             ` Konrad Rzeszutek Wilk
  2014-07-16  8:29               ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-07-15 16:48 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Boris Ostrovsky, David Vrabel, Jan Beulich

On Mon, Jul 14, 2014 at 10:07:55AM +0100, Ian Campbell wrote:
> On Mon, 2014-07-07 at 14:40 -0400, Konrad Rzeszutek Wilk wrote:
> > On Thu, Jul 03, 2014 at 11:24:30AM +0100, Jan Beulich wrote:
> > > >>> On 03.07.14 at 12:17, <david.vrabel@citrix.com> wrote:
> > > > On 03/07/14 11:08, Jan Beulich wrote:
> > > >>>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
> > > >>> On 03/07/14 08:59, Jan Beulich wrote:
> > > >>>> discard_zeroes_data also be communicated from backend to frontend?
> > > >>>
> > > >>> Perhaps. But how would you handle a guest that used to have
> > > >>> discard_zeroes_data but is restored with different storage that no
> > > >>> longer has this property?
> > > >> 
> > > >> Don't these attributes gets re-evaluated after restore anyway?
> > > > 
> > > > I don't see how that helps.  What if a discard request was submitted
> > > > before the suspend, expecting the discard to zero and on restore the
> > > > requests is queued for the new backend which then might not zero.
> > > 
> > > Hmm, good point. So it's then indeed better to not communicate this.
> > > Albeit similar issues arise with the existing attributes we communicate:
> > > What if the new backend doesn't satisfy the assumptions on the old
> > > one? Possibly the request may get failed, but possibly it may also get
> > > executed wrongly. Neither of which is very desirable.
> > 
> > That is OK with discard operations. It is OK if they fail intermediately.
> 
> Are there not security implications to failing a discard? Or do the
> interfaces not make that promise to the higher layers?

No security implications. The semantics behind a discard (ATA UNMAP
or SCSI DISCARD) is that it is a hint to the storage device.

If it starts failing, then users can stop issuing the discard operations
(or they can continue).
> 
> Ian.
> 

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

* Re: blkif discard attributes
  2014-07-15 16:48             ` Konrad Rzeszutek Wilk
@ 2014-07-16  8:29               ` Ian Campbell
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-07-16  8:29 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: xen-devel, Boris Ostrovsky, David Vrabel, Jan Beulich

On Tue, 2014-07-15 at 12:48 -0400, Konrad Rzeszutek Wilk wrote:
> On Mon, Jul 14, 2014 at 10:07:55AM +0100, Ian Campbell wrote:
> > On Mon, 2014-07-07 at 14:40 -0400, Konrad Rzeszutek Wilk wrote:
> > > On Thu, Jul 03, 2014 at 11:24:30AM +0100, Jan Beulich wrote:
> > > > >>> On 03.07.14 at 12:17, <david.vrabel@citrix.com> wrote:
> > > > > On 03/07/14 11:08, Jan Beulich wrote:
> > > > >>>>> On 03.07.14 at 11:43, <david.vrabel@citrix.com> wrote:
> > > > >>> On 03/07/14 08:59, Jan Beulich wrote:
> > > > >>>> discard_zeroes_data also be communicated from backend to frontend?
> > > > >>>
> > > > >>> Perhaps. But how would you handle a guest that used to have
> > > > >>> discard_zeroes_data but is restored with different storage that no
> > > > >>> longer has this property?
> > > > >> 
> > > > >> Don't these attributes gets re-evaluated after restore anyway?
> > > > > 
> > > > > I don't see how that helps.  What if a discard request was submitted
> > > > > before the suspend, expecting the discard to zero and on restore the
> > > > > requests is queued for the new backend which then might not zero.
> > > > 
> > > > Hmm, good point. So it's then indeed better to not communicate this.
> > > > Albeit similar issues arise with the existing attributes we communicate:
> > > > What if the new backend doesn't satisfy the assumptions on the old
> > > > one? Possibly the request may get failed, but possibly it may also get
> > > > executed wrongly. Neither of which is very desirable.
> > > 
> > > That is OK with discard operations. It is OK if they fail intermediately.
> > 
> > Are there not security implications to failing a discard? Or do the
> > interfaces not make that promise to the higher layers?
> 
> No security implications. The semantics behind a discard (ATA UNMAP
> or SCSI DISCARD) is that it is a hint to the storage device.

OK, great!

Ian.

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

end of thread, other threads:[~2014-07-16  8:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03  7:59 blkif discard attributes Jan Beulich
2014-07-03  9:43 ` David Vrabel
2014-07-03 10:08   ` Jan Beulich
2014-07-03 10:17     ` David Vrabel
2014-07-03 10:24       ` Jan Beulich
2014-07-07 18:40         ` Konrad Rzeszutek Wilk
2014-07-14  9:07           ` Ian Campbell
2014-07-15 16:48             ` Konrad Rzeszutek Wilk
2014-07-16  8:29               ` Ian Campbell

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.