.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
.\"
.\" SPDX-License-Identifier: LGPL-2.0-or-later
.\"
.TH io_uring_prep_remove_buffers 3 "March 13, 2022" "liburing-2.2" "liburing Manual"
.SH NAME
io_uring_prep_remove_buffers  - prepare a remove buffers request
.fi
.SH SYNOPSIS
.nf
.BR "#include <liburing.h>"
.PP
.BI "void io_uring_prep_remove_buffers(struct io_uring_sqe *sqe,"
.BI "                                   int nr,"
.BI "                                   int bgid);"
.PP
.SH DESCRIPTION
.PP
The io_uring_prep_remove_buffers() function prepares a request for removing
previously supplied buffers. The submission queue entry
.I sqe
is setup to remove
.I nr
number of buffers from the buffer group ID indicated by
.I bgid.

.SH RETURN VALUE
None
.SH ERRORS
These are the errors that are reported in the CQE
.I res
field. On success,
.I res
will contain the number of successfully removed buffers. On error,
the following errors can occur.
.TP
.B -ENOMEM
The kernel was unable to allocate memory for the request.
.TP
.B -EINVAL
One of the fields set in the SQE was invalid.
.TP
.B -ENOENT
No buffers exist at the specified
.I bgid
buffer group ID.
.SH SEE ALSO
.BR io_uring_get_sqe (3), io_uring_submit (3), io_uring_register (2), io_uring_prep_provide_buffers (3)

Add buffer remove prep man page
Add buffer remove prep man page

Signed-off-by: Jens Axboe <cd8c6775e60d6f67a6984377324e5290df3d5358@kernel.dk>
