All of lore.kernel.org
 help / color / mirror / Atom feed
* Compare And Write against unwritten ranges
@ 2016-07-26 12:14 David Disseldorp
  2016-07-26 18:29 ` Mike Christie
  0 siblings, 1 reply; 4+ messages in thread
From: David Disseldorp @ 2016-07-26 12:14 UTC (permalink / raw)
  To: Mike Christie; +Cc: ceph-devel@vger.kernel.org

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?

FWIW, I'm using the following test to trigger this from the client side:
https://github.com/sahlberg/libiscsi/pull/213/commits/e6f2ce306cf8706b666ec088fc74219bc52ea8cf

Cheers, David

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-29 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-07-29 11:09   ` David Disseldorp

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.