Actions
Bug #13730
closedesballoc(9f) could document esballoca/desballoca
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
In addition to esballoc/desballoc that are documented in esballoc(9f) the system provides variants of those functions with an 'a' suffix (esballoca/desballoca) which add a ref to the returned mblk, causing that mblk to be treated as read-only in the streams stack. Note that esballoca is used (eg.) in the NFS code for loaned buffers.
It would be nice if esballoc(9f) documented all four related functions.
Perhaps also add a comment before gesballoc() in io/stream.c like:
/* * Generic esballoc used to implement the four flavors: [d]esballoc[a]. * The variants with a 'd' prefix (desballoc, desballoca) * directly free the mblk when it loses its last ref, * where the other variants free asynchronously. * The variants with an 'a' suffix (esballoca, desballoca) * add an extra ref, effectively letting the streams subsystem * know that the message data should not be modified. */
See:
usr/src/man/man9f/esballoc.9f
usr/src/uts/common/io/stream.c
Updated by Gordon Ross about 2 years ago
- Difficulty changed from Medium to Bite-size
Updated by Electric Monk about 2 years ago
- Status changed from Pending RTI to Closed
- % Done changed from 0 to 100
git commit 2ab478d424c9f9ffde3495cfdf6cf2ac286fa2cf
commit 2ab478d424c9f9ffde3495cfdf6cf2ac286fa2cf Author: Gordon Ross <gordon.ross@tintri.com> Date: 2021-05-27T17:11:52.000Z 13730 esballoc(9f) could document esballoca/desballoca Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Actions