Print this page
use NULL capable segop as a shorthand for no-capabilities
Instead of forcing every segment driver to implement a dummy "return 0"
function, handle NULL capable segop function pointer as "no copabilities
supported" shorthand.

*** 131,141 **** static int segvn_setpagesize(struct seg *seg, caddr_t addr, size_t len, uint_t szc); static int segvn_getmemid(struct seg *seg, caddr_t addr, memid_t *memidp); static lgrp_mem_policy_info_t *segvn_getpolicy(struct seg *, caddr_t); - static int segvn_capable(struct seg *seg, segcapability_t capable); static int segvn_inherit(struct seg *, caddr_t, size_t, uint_t); struct seg_ops segvn_ops = { .dup = segvn_dup, .unmap = segvn_unmap, --- 131,140 ----
*** 156,166 **** .dump = segvn_dump, .pagelock = segvn_pagelock, .setpagesize = segvn_setpagesize, .getmemid = segvn_getmemid, .getpolicy = segvn_getpolicy, - .capable = segvn_capable, .inherit = segvn_inherit, }; /* * Common zfod structures, provided as a shorthand for others to use. --- 155,164 ----
*** 9483,9499 **** } return (policy_info); } - /*ARGSUSED*/ - static int - segvn_capable(struct seg *seg, segcapability_t capability) - { - return (0); - } - /* * Bind text vnode segment to an amp. If we bind successfully mappings will be * established to per vnode mapping per lgroup amp pages instead of to vnode * pages. There's one amp per vnode text mapping per lgroup. Many processes * may share the same text replication amp. If a suitable amp doesn't already --- 9481,9490 ----