All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] rbd: thick-provision image support
@ 2018-03-19 12:00 KAMEI Hitoshi
  2018-03-20 14:06 ` Ilya Dryomov
  0 siblings, 1 reply; 5+ messages in thread
From: KAMEI Hitoshi @ 2018-03-19 12:00 UTC (permalink / raw)
  To: idryomov, sage, elder, ceph-devel; +Cc: linux-kernel

This patch series adds the thick-provision image support to
/drivers/block/rbd.c relating to https://github.com/ceph/ceph/pull/18317.
The rbd will not issue the discard operation to thick-provision
images, if applied.

The rbd should not discard any allocated blocks of thick-provision
image to ensure writing data to rbd images. So this patch
prevents from discarding allocated blocks on thick-provision
image.

This patch series creates sysfs file to manipulate thick-provision
status. If users write "1" to /sys/bus/rbd/devices/<dev-id>/thick,
then the image is changed to thick-provision image. And if users
write "0" to it, then the image is changed to thin-provision
image. I will add the code changing status for the rbd map command.

Hitoshi Kamei (2):
  rbd: RBD_DEV_FLAG_THICK rbd_dev_flags bit
  rbd: add 'thick' sysfs rbd device attribute

 Documentation/ABI/testing/sysfs-bus-rbd |  6 ++++++
 drivers/block/rbd.c                     | 37 +++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

-- 
2.15.1

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

* Re: [PATCH 0/2] rbd: thick-provision image support
  2018-03-19 12:00 [PATCH 0/2] rbd: thick-provision image support KAMEI Hitoshi
@ 2018-03-20 14:06 ` Ilya Dryomov
  2018-03-20 22:31   ` Jason Dillaman
  2018-03-22 11:58   ` 亀井仁志 / KAMEI,HITOSHI
  0 siblings, 2 replies; 5+ messages in thread
From: Ilya Dryomov @ 2018-03-20 14:06 UTC (permalink / raw)
  To: KAMEI Hitoshi; +Cc: Sage Weil, Alex Elder, Ceph Development, linux-kernel

On Mon, Mar 19, 2018 at 1:00 PM, KAMEI Hitoshi
<hitoshi.kamei.xm@hitachi.com> wrote:
> This patch series adds the thick-provision image support to
> /drivers/block/rbd.c relating to https://github.com/ceph/ceph/pull/18317.
> The rbd will not issue the discard operation to thick-provision
> images, if applied.
>
> The rbd should not discard any allocated blocks of thick-provision
> image to ensure writing data to rbd images. So this patch
> prevents from discarding allocated blocks on thick-provision
> image.
>
> This patch series creates sysfs file to manipulate thick-provision
> status. If users write "1" to /sys/bus/rbd/devices/<dev-id>/thick,
> then the image is changed to thick-provision image. And if users
> write "0" to it, then the image is changed to thin-provision
> image. I will add the code changing status for the rbd map command.

Hi Hitoshi,

I think it should be a map time option -- e.g. rbd map -o thick.
I don't see any reason for allowing tweaking this setting on a mapped
image.

I looked through https://github.com/ceph/ceph/pull/18317 and I don't
see an equivalent functionality there.  rbd_discard_on_zeroed_write_same
set to false makes the actual zeroes go on the wire, but I don't see
anything for ignoring discard requests.  Can you point me at that?

Thanks,

                Ilya

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

* Re: [PATCH 0/2] rbd: thick-provision image support
  2018-03-20 14:06 ` Ilya Dryomov
@ 2018-03-20 22:31   ` Jason Dillaman
  2018-03-22 11:59     ` 亀井仁志 / KAMEI,HITOSHI
  2018-03-22 11:58   ` 亀井仁志 / KAMEI,HITOSHI
  1 sibling, 1 reply; 5+ messages in thread
From: Jason Dillaman @ 2018-03-20 22:31 UTC (permalink / raw)
  To: Ilya Dryomov
  Cc: KAMEI Hitoshi, Sage Weil, Alex Elder, Ceph Development, linux-kernel

There isn't currently an option to disable discards in librbd.
However, given that's the intent of this change, why not name the
option along the lines of "discard_disbled"?

On Tue, Mar 20, 2018 at 10:06 PM, Ilya Dryomov <idryomov@gmail.com> wrote:
> On Mon, Mar 19, 2018 at 1:00 PM, KAMEI Hitoshi
> <hitoshi.kamei.xm@hitachi.com> wrote:
>> This patch series adds the thick-provision image support to
>> /drivers/block/rbd.c relating to https://github.com/ceph/ceph/pull/18317.
>> The rbd will not issue the discard operation to thick-provision
>> images, if applied.
>>
>> The rbd should not discard any allocated blocks of thick-provision
>> image to ensure writing data to rbd images. So this patch
>> prevents from discarding allocated blocks on thick-provision
>> image.
>>
>> This patch series creates sysfs file to manipulate thick-provision
>> status. If users write "1" to /sys/bus/rbd/devices/<dev-id>/thick,
>> then the image is changed to thick-provision image. And if users
>> write "0" to it, then the image is changed to thin-provision
>> image. I will add the code changing status for the rbd map command.
>
> Hi Hitoshi,
>
> I think it should be a map time option -- e.g. rbd map -o thick.
> I don't see any reason for allowing tweaking this setting on a mapped
> image.
>
> I looked through https://github.com/ceph/ceph/pull/18317 and I don't
> see an equivalent functionality there.  rbd_discard_on_zeroed_write_same
> set to false makes the actual zeroes go on the wire, but I don't see
> anything for ignoring discard requests.  Can you point me at that?
>
> Thanks,
>
>                 Ilya
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Jason

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

* RE: Re: [PATCH 0/2] rbd: thick-provision image support
  2018-03-20 14:06 ` Ilya Dryomov
  2018-03-20 22:31   ` Jason Dillaman
@ 2018-03-22 11:58   ` 亀井仁志 / KAMEI,HITOSHI
  1 sibling, 0 replies; 5+ messages in thread
From: 亀井仁志 / KAMEI,HITOSHI @ 2018-03-22 11:58 UTC (permalink / raw)
  To: Ilya Dryomov; +Cc: Sage Weil, Alex Elder, Ceph Development, linux-kernel

Hi Ilya, 

> I think it should be a map time option -- e.g. rbd map -o thick.
> I don't see any reason for allowing tweaking this setting on a mapped image.

I will add such option to rbd map command. The modified rbd command
with the option writes "1" to sysfs file to disable discard operation at
run-time. And, when user programs issue discard request to an image
with the option, the patched kernel rbd driver ignores the discard
request.

Current kernel rbd driver always discards allocated blocks on an image
when user programs issue discard operation. For example, when an rbd image
is formatted by mkfs.xfs, the mkfs.xfs issues discard request and the 
kernel rbd driver discards allocated blocks. However, the kernel rbd driver
should keep all blocks of thick/fully provisioned image. This patch allows
the kernel rbd driver to ignore discard request for thick/fully provisioned
image.

> I looked through https://github.com/ceph/ceph/pull/18317 and I don't
> see an equivalent functionality there.  rbd_discard_on_zeroed_write_same
> set to false makes the actual zeroes go on the wire, but I don't see
> anything for ignoring discard requests.  Can you point me at that?

As Jason said, there is not currently an option in librbd. And the rbd
command also does not have any options for this patch. I will add the option
to rbd map command in the next step.

And, the reason why the previous email refers to the URL is that this patch
series is related to the thick/fully provisioned image described above.

Regards,

-- 
Hitoshi Kamei

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

* RE: Re: [PATCH 0/2] rbd: thick-provision image support
  2018-03-20 22:31   ` Jason Dillaman
@ 2018-03-22 11:59     ` 亀井仁志 / KAMEI,HITOSHI
  0 siblings, 0 replies; 5+ messages in thread
From: 亀井仁志 / KAMEI,HITOSHI @ 2018-03-22 11:59 UTC (permalink / raw)
  To: dillaman, Ilya Dryomov
  Cc: Sage Weil, Alex Elder, Ceph Development, linux-kernel

Hi Jason,

> However, given that's the intent of this change, why not name the
> option along the lines of "discard_disbled"?

Thank you for your comments.
I would like to change the name of sysfs file to "discard_disabled".
Also, I will add an option named discard_disabled to the rdb map command.

Regards,

-- 
Hitoshi Kamei

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

end of thread, other threads:[~2018-03-22 11:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 12:00 [PATCH 0/2] rbd: thick-provision image support KAMEI Hitoshi
2018-03-20 14:06 ` Ilya Dryomov
2018-03-20 22:31   ` Jason Dillaman
2018-03-22 11:59     ` 亀井仁志 / KAMEI,HITOSHI
2018-03-22 11:58   ` 亀井仁志 / KAMEI,HITOSHI

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.