Skip to content

Commit 65d0332

Browse files
committed
Merge tag 'ceph-for-4.12-rc4' of git://github.com/ceph/ceph-client
Pull ceph fix from Ilya Dryomov: "A small fix for rbd FALLOC_FL_ZERO_RANGE/PUNCH_HOLE handling breakage introduced in -rc1" * tag 'ceph-for-4.12-rc4' of git://github.com/ceph/ceph-client: rbd: implement REQ_OP_WRITE_ZEROES
2 parents 60c42a3 + 6ac5695 commit 65d0332

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/block/rbd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4023,6 +4023,7 @@ static void rbd_queue_workfn(struct work_struct *work)
40234023

40244024
switch (req_op(rq)) {
40254025
case REQ_OP_DISCARD:
4026+
case REQ_OP_WRITE_ZEROES:
40264027
op_type = OBJ_OP_DISCARD;
40274028
break;
40284029
case REQ_OP_WRITE:
@@ -4420,6 +4421,7 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
44204421
q->limits.discard_granularity = segment_size;
44214422
q->limits.discard_alignment = segment_size;
44224423
blk_queue_max_discard_sectors(q, segment_size / SECTOR_SIZE);
4424+
blk_queue_max_write_zeroes_sectors(q, segment_size / SECTOR_SIZE);
44234425

44244426
if (!ceph_test_opt(rbd_dev->rbd_client->client, NOCRC))
44254427
q->backing_dev_info->capabilities |= BDI_CAP_STABLE_WRITES;

0 commit comments

Comments
 (0)