From: Christoph Hellwig <hch@lst.de>
To: Christoph Hellwig <hch@lst.de>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-fsdevel@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH] block: reintroduce discard_zeroes_data sysfs file and BLKDISCARDZEROES
Date: Thu, 17 Aug 2017 11:52:42 +0200 [thread overview]
Message-ID: <20170817095242.GA29150@lst.de> (raw)
In-Reply-To: <20170817084143.dimlwgkmk2ywsy7v@rh_laptop>
On Thu, Aug 17, 2017 at 10:41:43AM +0200, Lukas Czerner wrote:
> Ok, guarantee in this case is probably too strong expression. But you
> know what I mean, saying "hey I am not using those blocks, feel free to
> release them if you can". I did not encounter the need to be so strict
> about discard, after all, it's for the device benefit.
That's what the BLKDISCARD ioctl, or fallocate with the
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE | FALLOC_FL_NO_HIDE_STALE
flags will do fr your.
> However there are device that do both (discard and zeroout) in discard
> request and that's what I am after. To be able to identify that's the
> case and take advantage. I think it's possible now with fallocate
> FALLOC_FL_PUNCH_HOLE, but I do not know anything in advance and I can't
> tell whether the device attempted to unmap as well even if it did.
With FALLOC_FL_PUNCH_HOLE you know that it is device offloaded.
We don't know that the device won't zero part or all of it, but
then again that was possible before when using BLKDISCARD as well.
Now after all that theory: is there a practial issue behind all
this?
next prev parent reply other threads:[~2017-08-17 9:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 13:19 [PATCH] block: reintroduce discard_zeroes_data sysfs file and BLKDISCARDZEROES Lukas Czerner
2017-08-16 15:18 ` Christoph Hellwig
2017-08-16 15:48 ` Lukas Czerner
2017-08-17 1:49 ` Martin K. Petersen
2017-08-17 7:47 ` Lukas Czerner
2017-08-17 8:17 ` Christoph Hellwig
2017-08-17 8:41 ` Lukas Czerner
2017-08-17 9:52 ` Christoph Hellwig [this message]
2017-08-17 13:35 ` Lukas Czerner
2017-08-17 17:47 ` Martin K. Petersen
2017-08-17 19:35 ` Lukas Czerner
2017-08-17 20:39 ` Theodore Ts'o
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=20170817095242.GA29150@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--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