Skip to content

Commit

Permalink
draft man for bdev discard
Browse files Browse the repository at this point in the history
Just a draft, clearly not in the right place.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
  • Loading branch information
isilence committed Sep 3, 2024
1 parent b5cd59e commit 653cf02
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions man/io_uring_enter.2
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,69 @@ is a pointer to siginfo_t, if any, being filled in. See also
.BR waitid(2)
for the general description of the related system call. Available since 6.5.

.TP
.B BLOCK_URING_CMD_DISCARD
Issue a discard command to the block device file.
.I fd
should point to a block device file,
.I addr
is the offset in bytes to start the operation from, and
.I addr3
should be set to the length of the operation in bytes.
It is an asynchronous equivalent of
.B BLOCK_URING_CMD_DISCARD.
It allows multiple parallel discards as well as other operations,
as a result it may result in races for the data on the disk, and it's the user's
responsibility to take care of it. Furthermore, we only do the best effort page
cache invalidation, the user has to make sure there are no other inflight
requests modifying or reading the range, otherwise it might lead to stale
page cache and data inconsistencies.

Available since 6.1*.

.TP
.B BLOCK_URING_CMD_WRITE_ZEROES
Issue a write zeroes command to the block device file.
.I fd
should point to a block device file,
.I addr
is the offset in bytes to start the operation from, and
.I addr3
should be set to the length of the operation in bytes.
It is an asynchronous equivalent of
.B BLKZEROOUT.
It allows issuing multiple parallel operations, as a result it may result in
races for the data on the disk, and it's the user's responsibility to take care
of it. Furthermore, we only do the best effort page cache invalidation, the
user has to make sure there are no other inflight requests modifying or
reading the range, otherwise it might lead to stale page cache and data
inconsistencies.

Available since 6.1*.

.TP
.B BLOCK_URING_CMD_WRITE_ZERO_PAGE
Issue a write request with the payload consisting of zeroes to the block
device file.
.I fd
should point to a block device file,
.I addr
is the offset in bytes within the disk to start the operation from, and
.I addr3
should be set to the length of the operation in bytes.
It is an equivalent of
.B BLOCK_URING_CMD_WRITE_ZEROES
but doesn't require hardware support and could be less efficient.
It allows issuing multiple parallel operations, as a result it may result in
races for the data on the disk, and it's the user's responsibility to take care
of it. Furthermore, we only do the best effort page cache invalidation, the
user has to make sure there are no other inflight requests modifying or
reading the range, otherwise it might lead to stale page cache and data
inconsistencies.

Available since 6.1*.


.PP
The
.I flags
Expand Down

0 comments on commit 653cf02

Please sign in to comment.