---
name: "blk_sync_queue"
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/blk_sync_queue"
---

# blk\_sync\_queue(9)

cancel any pending callbacks on a queue

## NAME

blk\_sync\_queue - cancel any pending callbacks on a queue

## SYNOPSIS

**void blk\_sync\_queue(struct request\_queue \*** *q***);**

## ARGUMENTS

*q*

the queue

## DESCRIPTION

The block layer may perform asynchronous callback activity on a queue, such as calling the unplug function after a timeout. A block device may call blk\_sync\_queue to ensure that any such activity is cancelled, thus allowing it to release resources that the callbacks might use. The caller must already have made sure that its -\>make\_request\_fn will not re-add plugging prior to calling this function.

This function does not cancel any asynchronous activity arising out of elevator or throttling code. That would require **elevator\_exit** and **blkcg\_exit\_queue** to be called with queue lock initialized.

## COPYRIGHT
