Skip to content

Commit

Permalink
Merge tag 'ceph-for-4.12-rc4' of git://github.com/ceph/ceph-client
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Jun 2, 2017
2 parents 60c42a3 + 6ac5695 commit 65d0332
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4023,6 +4023,7 @@ static void rbd_queue_workfn(struct work_struct *work)

switch (req_op(rq)) {
case REQ_OP_DISCARD:
case REQ_OP_WRITE_ZEROES:
op_type = OBJ_OP_DISCARD;
break;
case REQ_OP_WRITE:
Expand Down Expand Up @@ -4420,6 +4421,7 @@ static int rbd_init_disk(struct rbd_device *rbd_dev)
q->limits.discard_granularity = segment_size;
q->limits.discard_alignment = segment_size;
blk_queue_max_discard_sectors(q, segment_size / SECTOR_SIZE);
blk_queue_max_write_zeroes_sectors(q, segment_size / SECTOR_SIZE);

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

0 comments on commit 65d0332

Please sign in to comment.