diff options
author | jhb <jhb@FreeBSD.org> | 2009-08-21 02:59:07 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-08-21 02:59:07 +0000 |
commit | 9137c5d8b475c07cbaf42aeb2788ced063f4b32b (patch) | |
tree | 7289901c5d46b5197e5cdc4443d68bbb598ad5a4 /share | |
parent | 2a42aee236ff2c0696783f6b0503b2c92d2656d9 (diff) | |
download | FreeBSD-src-9137c5d8b475c07cbaf42aeb2788ced063f4b32b.zip FreeBSD-src-9137c5d8b475c07cbaf42aeb2788ced063f4b32b.tar.gz |
This patch fixes two bugs in sglist(9) and improves robustness of the API via
better semantics if a request to append an address range to an existing list
fails.
- When cloning an sglist, properly set the length in the new sglist instead of
leaving the new list empty.
- Properly compute the amount of data added to an sglist via
_sglist_append_buf(). This allows sglist_consume_uio() to properly update
uio_resid.
- When a request to append an address range to a scatter/gather list fails,
restore the sglist to the state it had at the start of the function call
instead of resetting it to an empty list.
Requested by: np (3)
Approved by: re (kib)
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/sglist.9 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/man/man9/sglist.9 b/share/man/man9/sglist.9 index a265498..e43a04b 100644 --- a/share/man/man9/sglist.9 +++ b/share/man/man9/sglist.9 @@ -191,6 +191,8 @@ Specifically, the family of routines can be used to append the physical address ranges described by an object to the end of a scatter/gather list. All of these routines return 0 on success or an error on failure. +If a request to append an address range to a scatter/gather list fails, +the scatter/gather list will remain unchanged. .Pp The .Nm sglist_append @@ -445,6 +447,7 @@ There are not enough available segments in the scatter/gather list to append the physical address ranges from .Fa second . .El +.Pp The .Nm sglist_slice function returns the following errors on failure: @@ -470,6 +473,7 @@ list in .Fa *slice to describe the requested physical address ranges. .El +.Pp The .Nm sglist_split function returns the following errors on failure: |