---
name: "scsi_internal_device_block"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/scsi_internal_device_block"
---

# scsi\_internal\_device\_block(9)

internal function to put a device temporarily into the SDEV\_BLOCK state

## NAME

scsi\_internal\_device\_block - internal function to put a device temporarily into the SDEV\_BLOCK state

## SYNOPSIS

**int scsi\_internal\_device\_block(struct scsi\_device \*** *sdev***);**

## ARGUMENTS

*sdev*

device to block

## DESCRIPTION

Block request made by scsi lld's to temporarily stop all scsi commands on the specified device. Called from interrupt or normal process context.

Returns zero if successful or error if not

## NOTES

This routine transitions the device to the SDEV\_BLOCK state (which must be a legal transition). When the device is in this state, all commands are deferred until the scsi lld reenables the device with scsi\_device\_unblock or device\_block\_tmo fires.

## AUTHORS

**James Bottomley** \<James.Bottomley@hansenpartnership.com\>

Author.

**Rob Landley** \<rob@landley.net\>

Author.

## COPYRIGHT
