From: Christoph Hellwig <hch@lst.de>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH] rbd: implement REQ_OP_WRITE_ZEROES
Date: Mon, 29 May 2017 10:43:48 +0200 [thread overview]
Message-ID: <20170529084348.GA11801@lst.de> (raw)
In-Reply-To: <1495552107-1237-1-git-send-email-idryomov@gmail.com>
On Tue, May 23, 2017 at 05:08:27PM +0200, Ilya Dryomov wrote:
> Commit 93c1defedcae ("rbd: remove the discard_zeroes_data flag")
> explicitly didn't implement REQ_OP_WRITE_ZEROES for rbd, while the
> following commit 48920ff2a5a9 ("block: remove the discard_zeroes_data
> flag") dropped ->discard_zeroes_data in favor of REQ_OP_WRITE_ZEROES.
>
> rbd does support efficient zeroing via CEPH_OSD_OP_ZERO opcode and will
> release either some or all blocks depending on whether the zeroing
> request is rbd_obj_bytes() aligned. This is how we currently implement
> discards, so REQ_OP_WRITE_ZEROES can be identical to REQ_OP_DISCARD for
> now. Caveats:
>
> - REQ_NOUNMAP is ignored, but AFAICT that's true of at least two other
> current implementations - nvme and loop
That's no problem, it's just a hint in case the device differenciates
the cases.
> - there is no ->write_zeroes_alignment and blk_bio_write_zeroes_split()
> is hence less helpful than blk_bio_discard_split(), but this can (and
> should) be fixed on the rbd side
Yes.
> In the future we will split these into two code paths to respect
> REQ_NOUNMAP on zeroout and save on zeroing blocks that couldn't be
> released on discard.
>
> Fixes: 93c1defedcae ("rbd: remove the discard_zeroes_data flag")
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
prev parent reply other threads:[~2017-05-29 8:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 15:08 [PATCH] rbd: implement REQ_OP_WRITE_ZEROES Ilya Dryomov
2017-05-23 18:28 ` Jason Dillaman
2017-05-24 11:38 ` Alexandre DERUMIER
2017-05-24 11:53 ` Jason Dillaman
2017-05-24 17:38 ` Alexandre DERUMIER
2017-05-24 19:34 ` Jason Dillaman
2017-05-29 8:39 ` Ilya Dryomov
2017-05-29 8:43 ` Christoph Hellwig [this message]
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=20170529084348.GA11801@lst.de \
--to=hch@lst.de \
--cc=ceph-devel@vger.kernel.org \
--cc=hare@suse.com \
--cc=idryomov@gmail.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 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.