From: David Disseldorp <ddiss@suse.de>
To: Mike Christie <mchristi@redhat.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: Compare And Write against unwritten ranges
Date: Wed, 27 Jul 2016 14:57:44 +0200 [thread overview]
Message-ID: <20160727145744.048f1fe3@echidna.suse.de> (raw)
In-Reply-To: <5797ABEF.1040101@redhat.com>
Thanks for the feedback Mike...
On Tue, 26 Jul 2016 13:29:03 -0500, Mike Christie wrote:
> On 07/26/2016 07:14 AM, David Disseldorp wrote:
> > Hi Mike,
> >
> > Returning to the OSD cmpext functionality in
> > https://github.com/ceph/ceph/pull/8911 , I'm wondering how such
> > requests should be handled against unwritten ranges.
> >
> > Currently an OSD will return -EINVAL to the client, as the short read
> > will be caught via:
> > https://github.com/ceph/ceph/pull/8911/commits/440895ea9f2604756c9f3c81e5c4ec5ca40401d7#diff-72747d40a424e7b5404366b557ff12a3R3722
> > -EINVAL then means that krbd will return an error for the corresponding
> > client I/O.
> >
> > For read requests, rbd_img_obj_request_read_callback() handles
> > zero-filling read buffers that cover unwritten RBD ranges. For SCSI
> > Compare And Write the OSD is responsible for atomicity, so zero-filling
> > on the client side is problematic.
> > One potential option could be to add a truncate/zero operation to the
> > Compare And Write compound request, or optionally support truncate_seq
> > and truncate_size parameters in cmpext. Any thoughts/suggestions on the
> > approach here?
>
> We have a similar problem if the data needed to be copyup'd right? I
Similar, but different - copyup should be handled via the
rbd_img_obj_parent_read_full() logic in rbd_img_obj_request_submit().
> think the multi-op route might be nice because it could work for both cases.
>
> Did you already try the multi op zero/truncate approach? Did you have to
> make changes to the OSD code too?
I'm working on a multi-op prototype now, and will send you the patches
when done. I don't expect any changes on the OSD side.
> A long while back, I was working on the copyup part of the problem but I
> hit another problem. It was something like the copyup's write would
> succeed, but when the cmpext op does the read it will fail still. If I
> sent it down as a multi-op, some other bits/structs on the OSD side
> needed to be updated before I could do the cmpext op. I cannot find the
> patches and I never submitted because I had just hacked it in for
> testing. Did you hit something similar?
Yeah, I've seen issues with copyup+cmpext+write, but am treating that
as a separate problem for now.
Cheers, David
next prev parent reply other threads:[~2016-07-27 12:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 12:14 Compare And Write against unwritten ranges David Disseldorp
2016-07-26 18:29 ` Mike Christie
2016-07-27 12:57 ` David Disseldorp [this message]
2016-07-29 11:09 ` David Disseldorp
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=20160727145744.048f1fe3@echidna.suse.de \
--to=ddiss@suse.de \
--cc=ceph-devel@vger.kernel.org \
--cc=mchristi@redhat.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.