rbd: round off and ignore discards that are too small
authorIlya Dryomov <idryomov@gmail.com>
Wed, 30 Jan 2019 14:14:48 +0000 (15:14 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 5 Mar 2019 17:55:17 +0000 (18:55 +0100)
commit0c93e1b7a26b418247218d08a6d0b95d61c9c415
tree036a8f093a51dce44a8263df242b5ee17b9e0c3b
parent6484cbe987e0e44b8ebf224fc9faf7f73ace10d2
rbd: round off and ignore discards that are too small

If, after rounding off, the discard request is smaller than alloc_size,
drop it on the floor in __rbd_img_fill_request().

Default alloc_size to 64k.  This should cover both HDD and SSD based
bluestore OSDs and somewhat improve things for filestore.  For OSDs on
filestore with filestore_punch_hole = false, alloc_size is best set to
object size in order to allow deletes and truncates and disallow zero
op.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
drivers/block/rbd.c