public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ric Wheeler <ricwheeler@gmail.com>
To: Bryan Gurney <bgurney@redhat.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	"Dave Chinner" <david@fromorbit.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	linux-block <linux-block@vger.kernel.org>,
	"Linux FS Devel" <linux-fsdevel@vger.kernel.org>,
	"Lukáš Czerner" <lczerner@redhat.com>
Subject: Re: Testing devices for discard support properly
Date: Thu, 9 May 2019 13:27:30 -0400	[thread overview]
Message-ID: <ac188221-5d17-bf30-99f1-6a8d152a2f83@gmail.com> (raw)
In-Reply-To: <CAHhmqcS19DUptiUeQ7q3pPCiZ6QcAXYxQwaX5nQ1FM38trzWtQ@mail.gmail.com>



On 5/9/19 12:02 PM, Bryan Gurney wrote:
> On Wed, May 8, 2019 at 2:12 PM Ric Wheeler <ricwheeler@gmail.com> wrote:
>>
>> (stripped out the html junk, resending)
>>
>> On 5/8/19 1:25 PM, Martin K. Petersen wrote:
>>>>> WRITE SAME also has an ANCHOR flag which provides a use case we
>>>>> currently don't have fallocate plumbing for: Allocating blocks without
>>>>> caring about their contents. I.e. the blocks described by the I/O are
>>>>> locked down to prevent ENOSPC for future writes.
>>>> Thanks for that detail! Sounds like ANCHOR in this case exposes
>>>> whatever data is there (similar I suppose to normal block device
>>>> behavior without discard for unused space)? Seems like it would be
>>>> useful for virtually provisioned devices (enterprise arrays or
>>>> something like dm-thin targets) more than normal SSD's?
>>> It is typically used to pin down important areas to ensure one doesn't
>>> get ENOSPC when writing journal or metadata. However, these are
>>> typically the areas that we deliberately zero to ensure predictable
>>> results. So I think the only case where anchoring makes much sense is on
>>> devices that do zero detection and thus wouldn't actually provision N
>>> blocks full of zeroes.
>>
>> This behavior at the block layer might also be interesting for something
>> like the VDO device (compression/dedup make it near impossible to
>> predict how much space is really there since it is content specific).
>> Might be useful as a way to hint to VDO about how to give users a
>> promise of "at least this much" space? If the content is good for
>> compression or dedup, you would get more, but never see less.
>>
> 
> In the case of VDO, writing zeroed blocks will not consume space, due
> to the zero block elimination in VDO.  However, that also means that
> it won't "reserve" space, either.  The WRITE SAME command with the
> ANCHOR flag is SCSI, so it won't apply to a bio-based device.
> 
> Space savings also results in a write of N blocks having a fair chance
> of the end result ultimately using "less than N" blocks, depending on
> how much space savings can be achieved.  Likewise, a discard of N
> blocks has a chance of reclaiming "less than N" blocks.
> 

Are there other API's that let you allocate a minimum set of physical 
blocks to a VDO device?

Thanks!

Ric



  reply	other threads:[~2019-05-09 17:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 20:56 Testing devices for discard support properly Ric Wheeler
2019-05-07  7:10 ` Lukas Czerner
2019-05-07  8:48   ` Jan Tulak
2019-05-07  9:40     ` Lukas Czerner
2019-05-07 12:57       ` Ric Wheeler
2019-05-07 15:35         ` Bryan Gurney
2019-05-07 15:44           ` Ric Wheeler
2019-05-07 20:09             ` Bryan Gurney
2019-05-07 21:24               ` Chris Mason
2019-06-03 20:01                 ` Ric Wheeler
2019-05-07  8:21 ` Nikolay Borisov
2019-05-07 22:04 ` Dave Chinner
2019-05-08  0:07   ` Ric Wheeler
2019-05-08  1:14     ` Dave Chinner
2019-05-08 15:05       ` Ric Wheeler
2019-05-08 17:03         ` Martin K. Petersen
2019-05-08 17:09           ` Ric Wheeler
2019-05-08 17:25             ` Martin K. Petersen
2019-05-08 18:12               ` Ric Wheeler
2019-05-09 16:02                 ` Bryan Gurney
2019-05-09 17:27                   ` Ric Wheeler [this message]
2019-05-09 20:35                     ` Bryan Gurney
2019-05-08 21:58             ` Dave Chinner
2019-05-09  2:29               ` Martin K. Petersen
2019-05-09  3:20                 ` Dave Chinner
2019-05-09  4:35                   ` Martin K. Petersen
2019-05-08 16:16   ` Martin K. Petersen
2019-05-08 22:31     ` Dave Chinner
2019-05-09  3:55       ` Martin K. Petersen
2019-05-09 13:40         ` Ric Wheeler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac188221-5d17-bf30-99f1-6a8d152a2f83@gmail.com \
    --to=ricwheeler@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bgurney@redhat.com \
    --cc=david@fromorbit.com \
    --cc=lczerner@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox