On Sat, 12 Jan 2019 at 23:59, Igor Kozhukhov <[email protected]> wrote:
> vdev.c contain line:
> list_link_init(&vd->vdev_initialize_node);
> https://github.com/zfsonlinux/zfs/commit/c10d37dd9f5d56e19330add732f1a713250d24f7#diff-bf443e91ad3ff160585ee09aeb64f2ecR533
>
> and i can see several lines with list_link_init(), but these updates are not 
> available on illumos tree.
>
> question is: do we need port additional updates from ZoL for list_link_init() 
> or can safely ignore it with ports from ZoL to illumos ?

If you look at the illumos "list_link_init()" implementation, you'll
see that it just sets the members of the list node to NULL.  I believe
the object which contains the node is allocated within the same
function, using "kmem_zalloc()", so it's almost certainly already NULL
at this stage.

The call is likely technically correct, but with the current list_t
implementation in illumos it isn't strictly required.  Indeed, in the
manual page:

       The list_link_init() function initializes the list_node_t. It is
       functionally equivalent to bzero(node, sizeof(*node));

Is it possible that the ZOL implementation of list_link_init() uses a
sentinel value other than NULL for initialised list nodes?


Cheers.

-- 
Joshua M. Clulow
Engineer @ Joyent
http://blog.sysmgr.org

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T4fc42d2ca2431c8a-Mce313e6545dc1c4dd0e5a2be
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to