---
name: "get_request_wait"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/get_request_wait"
---

# get\_request\_wait(9)

get a free request with retry

## NAME

get\_request\_wait - get a free request with retry

## SYNOPSIS

**struct request \* get\_request\_wait(struct request\_queue \*** *q***, int** *rw\_flags***, struct bio \*** *bio***);**

## ARGUMENTS

*q*

request\_queue to allocate request from

*rw\_flags*

RW and SYNC flags

*bio*

bio to allocate request for (can be **NULL**)

## DESCRIPTION

Get a free request from *q*. This function keeps retrying under memory pressure and fails iff *q* is dead.

Must be callled with *q*-\>queue\_lock held and, Returns **NULL** on failure, with *q*-\>queue\_lock held. Returns !**NULL** on success, with *q*-\>queue\_lock \*not held\*.

## COPYRIGHT
