linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, neilb@suse.de
Subject: Re: [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function
Date: Fri, 7 Nov 2014 00:26:10 -0800	[thread overview]
Message-ID: <20141107082610.GC8394@infradead.org> (raw)
In-Reply-To: <1415336894-15327-4-git-send-email-martin.petersen@oracle.com>

On Fri, Nov 07, 2014 at 12:08:14AM -0500, Martin K. Petersen wrote:
> blkdev_issue_discard() will zero a given block range on disk. This is
> done by way of either WRITE SAME or regular WRITE. I.e. the blocks on
> disk will be written and thus provisioned.
> 
> There are use cases where the desired behavior is to zero the blocks but
> unprovision them if possible. The blocks must deterministically contain
> zeroes when they are subsequently read back.
> 
> This patch introduces a blkdev_issue_zeroout_discard() call that
> provides this functionality. If a block device guarantees
> discard_zeroes_data the new function will use discard to clear the block
> range. If the device does not support discard_zeroes_data or if the
> discard request fails we will fall back to blkdev_issue_zeroout() to
> ensure predictable results.

I'm not a fan of adding another function here and would prefer a flag,
but it looks correct, so:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2014-11-07  8:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07  5:08 [RFC] Discard update for 3.19 Martin K. Petersen
2014-11-07  5:08 ` [PATCH 1/3] libata: Whitelist SSDs that are known to properly return zeroes after TRIM Martin K. Petersen
2014-11-07  8:24   ` Christoph Hellwig
2014-11-07 15:37     ` Martin K. Petersen
2014-12-05 16:45   ` Paolo Bonzini
2014-12-05 22:58   ` Elliott, Robert (Server Storage)
2014-12-08 15:15     ` Theodore Ts'o
2014-12-08 15:28       ` James Bottomley
2014-12-08 22:59       ` One Thousand Gnomes
2014-11-07  5:08 ` [PATCH 2/3] sd: Disable discard_zeroes_data for UNMAP Martin K. Petersen
2014-11-07  8:25   ` Christoph Hellwig
2014-11-10 23:43   ` Paolo Bonzini
2014-11-07  5:08 ` [PATCH 3/3] block: Introduce blkdev_issue_zeroout_discard() function Martin K. Petersen
2014-11-07  8:26   ` Christoph Hellwig [this message]
2014-11-07 15:42     ` Martin K. Petersen
2014-11-07 16:20       ` Theodore Ts'o
2014-11-07 16:27         ` Martin K. Petersen
2014-11-14 20:22           ` Martin K. Petersen
2014-11-17 18:53             ` Darrick J. Wong
2014-11-11  0:04   ` Darrick J. Wong
2014-11-11  2:33     ` Martin K. Petersen
2014-11-17 19:28     ` [PATCH] block: create ioctl to discard-or-zeroout a range of blocks Darrick J. Wong
2014-11-07 12:09 ` [RFC] Discard update for 3.19 Bernd Schubert
2014-11-07 12:11 ` Bernd Schubert
2014-11-07 15:46   ` Martin K. Petersen
2014-11-10 14:19 ` Christoph Hellwig
2014-11-12 18:40   ` Ewan Milne
2014-11-12 19:41     ` Martin K. Petersen

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=20141107082610.GC8394@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=neilb@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).