Re: [RFC 0/2] rbd: respect REQ_NOUNMAP by setting new nounmap flag for ZERO op

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 18, 2019 at 3:56 PM Roman Penyaev <rpenyaev@xxxxxxx> wrote:
>
> Hi all,
>
> This is an attempt to split DISCARD and WRITE_ZEROES paths on krbd side
> when REQ_NOUNMAP flag is set for a block layer request.

Hi Roman,

I'm working on splitting DISCARD and WRITE_ZEROES handling right now.
The idea is to punt on small and/or unaligned discard requests which
don't actually free up any space but translate into a RADOS zero op.
I'm not changing how WRITE_ZEROES is implemented though, so this is
orthogonal to your work -- just wanted to give a heads up.

>
> Currently both REQ_OP_DISCARD and REQ_OP_WRITE_ZEROES block layer requests
> fall down to CEPH_OSD_OP_ZERO request, which punches holes on osd side.
>
> With a new CEPH_OSD_OP_FLAG_ZERO_NOUNMAP flag for CEPH_OSD_OP_ZERO request
> osd can zero out blocks, instead of punching holes.

REQ_NOUNMAP is just a hint, the block device is free to ignore it.
IIRC the only way to control it from userspace is through fallocate(2):
FALLOC_FL_PUNCH_HOLE can unmap, while FALLOC_FL_ZERO_RANGE is supposed
to not unmap.  Given that fallocate(2) on block devices is fairly new,
I'm curious if you have an application that actually cares in mind?

Thanks,

                Ilya



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux