Skip to content

Commit 4bf5843

Browse files
Christoph Hellwigaxboe
authored andcommitted
dm: remove incomplete BLOCK_PC support
DM tries to copy a few fields around for BLOCK_PC requests, but given that no dm-target ever wires up scsi_cmd_ioctl BLOCK_PC can't actually be sent to dm. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 48b77ad commit 4bf5843

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

drivers/md/dm-rq.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,6 @@ static void dm_end_request(struct request *clone, int error)
270270
struct mapped_device *md = tio->md;
271271
struct request *rq = tio->orig;
272272

273-
if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
274-
rq->errors = clone->errors;
275-
rq->resid_len = clone->resid_len;
276-
277-
if (rq->sense)
278-
/*
279-
* We are using the sense buffer of the original
280-
* request.
281-
* So setting the length of the sense data is enough.
282-
*/
283-
rq->sense_len = clone->sense_len;
284-
}
285-
286273
free_rq_clone(clone);
287274
rq_end_stats(md, rq);
288275
if (!rq->q->mq_ops)
@@ -511,9 +498,6 @@ static int setup_clone(struct request *clone, struct request *rq,
511498
if (r)
512499
return r;
513500

514-
clone->cmd = rq->cmd;
515-
clone->cmd_len = rq->cmd_len;
516-
clone->sense = rq->sense;
517501
clone->end_io = end_clone_request;
518502
clone->end_io_data = tio;
519503

0 commit comments

Comments
 (0)