Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\scsi_ioctl.c Create Date:2022-07-28 17:36:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_fill_sghdr_rq

Proto:static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq, struct sg_io_hdr *hdr, fmode_t mode)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
struct request *rq
struct sg_io_hdr *hdr
fmode_tmode
221  req = scsi_req(rq)
223  If copy_from_user(cmd, [i], [*i] points to command to perform , [i] SCSI command length ) Then Return -EFAULT
225  If blk_verify_command(cmd, mode) Then Return -EPERM
231  cmd_len = [i] SCSI command length
233  timeout = msecs_to_jiffies: - convert milliseconds to jiffies*@m: time in milliseconds* conversion is done as follows:* - negative values mean 'infinite timeout' (MAX_JIFFY_OFFSET)* - 'too large' values [that would result in larger than
234  If Not timeout Then timeout = * sg stuff
236  If Not timeout Then timeout = default timeout for SG_IO if none specified
238  If timeout < BLK_MIN_SG_TIMEOUT Then timeout = BLK_MIN_SG_TIMEOUT
241  Return 0
Caller
NameDescribe
sg_io