[PATCH 1/3] bsg: Make job reply size different than SCSI_SENSE_BUFFERSIZE

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

 



The size of the bsg job reply was set to SCSI_SENSE_BUFFERSIZE back then
while it was part of the bsg_command. However, for the scsi transport
that uses it, it does not carry the scsi sense information.

Rename it to clarify this point, and while at it, make it a little bit
larger, so it'll be able to carry some useful information,
e.g. ufs descriptors, should be needed.

Signed-off-by: Avri Altman <avri.altman@xxxxxxx>
---
 block/bsg-lib.c         | 4 ++--
 include/linux/bsg-lib.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index f3501cd..5cb2e38 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -271,7 +271,7 @@ static int bsg_init_rq(struct request_queue *q, struct request *req, gfp_t gfp)
 {
 	struct bsg_job *job = blk_mq_rq_to_pdu(req);
 
-	job->reply = kzalloc(SCSI_SENSE_BUFFERSIZE, gfp);
+	job->reply = kzalloc(BSG_REPLY_BUFFERSIZE, gfp);
 	if (!job->reply)
 		return -ENOMEM;
 	return 0;
@@ -285,7 +285,7 @@ static void bsg_initialize_rq(struct request *req)
 
 	memset(job, 0, sizeof(*job));
 	job->reply = reply;
-	job->reply_len = SCSI_SENSE_BUFFERSIZE;
+	job->reply_len = BSG_REPLY_BUFFERSIZE;
 	job->dd_data = job + 1;
 }
 
diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h
index 6aeaf64..3cf9d0b 100644
--- a/include/linux/bsg-lib.h
+++ b/include/linux/bsg-lib.h
@@ -26,6 +26,8 @@
 #include <linux/blkdev.h>
 #include <scsi/scsi_request.h>
 
+#define BSG_REPLY_BUFFERSIZE	320
+
 struct request;
 struct device;
 struct scatterlist;
-- 
1.9.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux