---
name: "end_request"
section: "9"
platform: "linux"
package: "linux-manual-2.6.26"
version: "2.6.26-29"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/end_request"
---

# end\_request(9)

end I/O on the current segment of the request

## NAME

end\_request - end I/O on the current segment of the request

## SYNOPSIS

**void end\_request(struct request \*** *req***, int** *uptodate***);**

## ARGUMENTS

*req*

the request being processed

*uptodate*

error value or 0/1 uptodate flag

## DESCRIPTION

Ends I/O on the current segment of a request. If that is the only remaining segment, the request is also completed and freed.

This is a remnant of how older block drivers handled IO completions. Modern drivers typically end IO on the full request in one go, unless they have a residual value to account for. For that case this function isn´t really useful, unless the residual just happens to be the full current segment. In other words, don´t use this function in new code. Either use **end\_request\_completely**, or the **end\_that\_request\_chunk** (along with **end\_that\_request\_last**) for partial completions.

## COPYRIGHT
