mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Merge branch 'for-4.11/next' into for-4.11/linus-merge
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
commit
818551e2b2
171 changed files with 2494 additions and 2850 deletions
|
|
@ -104,6 +104,7 @@ config NFSD_SCSILAYOUT
|
|||
depends on NFSD_V4 && BLOCK
|
||||
select NFSD_PNFS
|
||||
select EXPORTFS_BLOCK_OPS
|
||||
select BLK_SCSI_REQUEST
|
||||
help
|
||||
This option enables support for the exporting pNFS SCSI layouts
|
||||
in the kernel's NFS server. The pNFS SCSI layout enables NFS
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/nfsd/debug.h>
|
||||
#include <scsi/scsi_proto.h>
|
||||
#include <scsi/scsi_common.h>
|
||||
#include <scsi/scsi_request.h>
|
||||
|
||||
#include "blocklayoutxdr.h"
|
||||
#include "pnfs.h"
|
||||
|
|
@ -213,6 +214,7 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev,
|
|||
{
|
||||
struct request_queue *q = bdev->bd_disk->queue;
|
||||
struct request *rq;
|
||||
struct scsi_request *req;
|
||||
size_t bufflen = 252, len, id_len;
|
||||
u8 *buf, *d, type, assoc;
|
||||
int error;
|
||||
|
|
@ -221,23 +223,24 @@ static int nfsd4_scsi_identify_device(struct block_device *bdev,
|
|||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
rq = blk_get_request(q, READ, GFP_KERNEL);
|
||||
rq = blk_get_request(q, REQ_OP_SCSI_IN, GFP_KERNEL);
|
||||
if (IS_ERR(rq)) {
|
||||
error = -ENOMEM;
|
||||
goto out_free_buf;
|
||||
}
|
||||
blk_rq_set_block_pc(rq);
|
||||
req = scsi_req(rq);
|
||||
scsi_req_init(rq);
|
||||
|
||||
error = blk_rq_map_kern(q, rq, buf, bufflen, GFP_KERNEL);
|
||||
if (error)
|
||||
goto out_put_request;
|
||||
|
||||
rq->cmd[0] = INQUIRY;
|
||||
rq->cmd[1] = 1;
|
||||
rq->cmd[2] = 0x83;
|
||||
rq->cmd[3] = bufflen >> 8;
|
||||
rq->cmd[4] = bufflen & 0xff;
|
||||
rq->cmd_len = COMMAND_SIZE(INQUIRY);
|
||||
req->cmd[0] = INQUIRY;
|
||||
req->cmd[1] = 1;
|
||||
req->cmd[2] = 0x83;
|
||||
req->cmd[3] = bufflen >> 8;
|
||||
req->cmd[4] = bufflen & 0xff;
|
||||
req->cmd_len = COMMAND_SIZE(INQUIRY);
|
||||
|
||||
error = blk_execute_rq(rq->q, NULL, rq, 1);
|
||||
if (error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue