Print this page
7127  remove -Wno-missing-braces from Makefile.uts


 163 }
 164 
 165 #define S_ISFENCED(sp)  ((VTOS((sp)->s_commonvp))->s_flag & SFENCED)
 166 
 167 struct vnodeops *spec_vnodeops;
 168 
 169 /*
 170  * *PLEASE NOTE*: If you add new entry points to specfs, do
 171  * not forget to add support for fencing. A fenced snode
 172  * is indicated by the SFENCED flag in the common snode.
 173  * If a snode is fenced, determine if your entry point is
 174  * a configuration operation (Example: open), a detection
 175  * operation (Example: gettattr), an I/O operation (Example: ioctl())
 176  * or an unconfiguration operation (Example: close). If it is
 177  * a configuration or detection operation, fail the operation
 178  * for a fenced snode with an ENXIO or EIO as appropriate. If
 179  * it is any other operation, let it through.
 180  */
 181 
 182 const fs_operation_def_t spec_vnodeops_template[] = {
 183         VOPNAME_OPEN,           { .vop_open = spec_open },
 184         VOPNAME_CLOSE,          { .vop_close = spec_close },
 185         VOPNAME_READ,           { .vop_read = spec_read },
 186         VOPNAME_WRITE,          { .vop_write = spec_write },
 187         VOPNAME_IOCTL,          { .vop_ioctl = spec_ioctl },
 188         VOPNAME_GETATTR,        { .vop_getattr = spec_getattr },
 189         VOPNAME_SETATTR,        { .vop_setattr = spec_setattr },
 190         VOPNAME_ACCESS,         { .vop_access = spec_access },
 191         VOPNAME_CREATE,         { .vop_create = spec_create },
 192         VOPNAME_FSYNC,          { .vop_fsync = spec_fsync },
 193         VOPNAME_INACTIVE,       { .vop_inactive = spec_inactive },
 194         VOPNAME_FID,            { .vop_fid = spec_fid },
 195         VOPNAME_SEEK,           { .vop_seek = spec_seek },
 196         VOPNAME_PATHCONF,       { .vop_pathconf = spec_pathconf },
 197         VOPNAME_FRLOCK,         { .vop_frlock = spec_frlock },
 198         VOPNAME_REALVP,         { .vop_realvp = spec_realvp },
 199         VOPNAME_GETPAGE,        { .vop_getpage = spec_getpage },
 200         VOPNAME_PUTPAGE,        { .vop_putpage = spec_putpage },
 201         VOPNAME_MAP,            { .vop_map = spec_map },
 202         VOPNAME_ADDMAP,         { .vop_addmap = spec_addmap },
 203         VOPNAME_DELMAP,         { .vop_delmap = spec_delmap },
 204         VOPNAME_POLL,           { .vop_poll = spec_poll },
 205         VOPNAME_DUMP,           { .vop_dump = spec_dump },
 206         VOPNAME_PAGEIO,         { .vop_pageio = spec_pageio },
 207         VOPNAME_SETSECATTR,     { .vop_setsecattr = spec_setsecattr },
 208         VOPNAME_GETSECATTR,     { .vop_getsecattr = spec_getsecattr },
 209         NULL,                   NULL
 210 };
 211 
 212 /*
 213  * Return address of spec_vnodeops
 214  */
 215 struct vnodeops *
 216 spec_getvnodeops(void)
 217 {
 218         return (spec_vnodeops);
 219 }
 220 
 221 extern vnode_t *rconsvp;
 222 
 223 /*
 224  * Acquire the serial lock on the common snode.
 225  */
 226 #define LOCK_CSP(csp)                   (void) spec_lockcsp(csp, 0, 1, 0)
 227 #define LOCKHOLD_CSP_SIG(csp)           spec_lockcsp(csp, 1, 1, 1)
 228 #define SYNCHOLD_CSP_SIG(csp, intr)     spec_lockcsp(csp, intr, 0, 1)
 229 




 163 }
 164 
 165 #define S_ISFENCED(sp)  ((VTOS((sp)->s_commonvp))->s_flag & SFENCED)
 166 
 167 struct vnodeops *spec_vnodeops;
 168 
 169 /*
 170  * *PLEASE NOTE*: If you add new entry points to specfs, do
 171  * not forget to add support for fencing. A fenced snode
 172  * is indicated by the SFENCED flag in the common snode.
 173  * If a snode is fenced, determine if your entry point is
 174  * a configuration operation (Example: open), a detection
 175  * operation (Example: gettattr), an I/O operation (Example: ioctl())
 176  * or an unconfiguration operation (Example: close). If it is
 177  * a configuration or detection operation, fail the operation
 178  * for a fenced snode with an ENXIO or EIO as appropriate. If
 179  * it is any other operation, let it through.
 180  */
 181 
 182 const fs_operation_def_t spec_vnodeops_template[] = {
 183         { VOPNAME_OPEN,         { .vop_open = spec_open } },
 184         { VOPNAME_CLOSE,        { .vop_close = spec_close } },
 185         { VOPNAME_READ,         { .vop_read = spec_read } },
 186         { VOPNAME_WRITE,        { .vop_write = spec_write } },
 187         { VOPNAME_IOCTL,        { .vop_ioctl = spec_ioctl } },
 188         { VOPNAME_GETATTR,      { .vop_getattr = spec_getattr } },
 189         { VOPNAME_SETATTR,      { .vop_setattr = spec_setattr } },
 190         { VOPNAME_ACCESS,       { .vop_access = spec_access } },
 191         { VOPNAME_CREATE,       { .vop_create = spec_create } },
 192         { VOPNAME_FSYNC,        { .vop_fsync = spec_fsync } },
 193         { VOPNAME_INACTIVE,     { .vop_inactive = spec_inactive } },
 194         { VOPNAME_FID,          { .vop_fid = spec_fid } },
 195         { VOPNAME_SEEK,         { .vop_seek = spec_seek } },
 196         { VOPNAME_PATHCONF,     { .vop_pathconf = spec_pathconf } },
 197         { VOPNAME_FRLOCK,       { .vop_frlock = spec_frlock } },
 198         { VOPNAME_REALVP,       { .vop_realvp = spec_realvp } },
 199         { VOPNAME_GETPAGE,      { .vop_getpage = spec_getpage } },
 200         { VOPNAME_PUTPAGE,      { .vop_putpage = spec_putpage } },
 201         { VOPNAME_MAP,          { .vop_map = spec_map } },
 202         { VOPNAME_ADDMAP,       { .vop_addmap = spec_addmap } },
 203         { VOPNAME_DELMAP,       { .vop_delmap = spec_delmap } },
 204         { VOPNAME_POLL,         { .vop_poll = spec_poll } },
 205         { VOPNAME_DUMP,         { .vop_dump = spec_dump } },
 206         { VOPNAME_PAGEIO,       { .vop_pageio = spec_pageio } },
 207         { VOPNAME_SETSECATTR,   { .vop_setsecattr = spec_setsecattr } },
 208         { VOPNAME_GETSECATTR,   { .vop_getsecattr = spec_getsecattr } },
 209         { NULL,                 { NULL } }
 210 };
 211 
 212 /*
 213  * Return address of spec_vnodeops
 214  */
 215 struct vnodeops *
 216 spec_getvnodeops(void)
 217 {
 218         return (spec_vnodeops);
 219 }
 220 
 221 extern vnode_t *rconsvp;
 222 
 223 /*
 224  * Acquire the serial lock on the common snode.
 225  */
 226 #define LOCK_CSP(csp)                   (void) spec_lockcsp(csp, 0, 1, 0)
 227 #define LOCKHOLD_CSP_SIG(csp)           spec_lockcsp(csp, 1, 1, 1)
 228 #define SYNCHOLD_CSP_SIG(csp, intr)     spec_lockcsp(csp, intr, 0, 1)
 229