Project

General

Profile

Actions

Bug #13730

closed

esballoc(9f) could document esballoca/desballoca

Added by Gordon Ross 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

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

Actions #1

Updated by Gordon Ross 9 months ago

  • Description updated (diff)
Actions #2

Updated by Gordon Ross 9 months ago

  • Description updated (diff)
Actions #3

Updated by Gordon Ross 9 months ago

  • Difficulty changed from Medium to Bite-size
Actions #4

Updated by Electric Monk 9 months ago

  • Gerrit CR set to 1439
Actions #5

Updated by Gordon Ross 8 months ago

  • Status changed from New to Pending RTI
Actions #6

Updated by Electric Monk 8 months 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

Also available in: Atom PDF