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


 176 static  daddr32_t *save_dblks(struct inode *, struct ufsvfs *, daddr32_t *,
 177                 daddr32_t *, int, int);
 178 static  int ufs_getsecattr(struct vnode *, vsecattr_t *, int, struct cred *,
 179                 caller_context_t *);
 180 static  int ufs_setsecattr(struct vnode *, vsecattr_t *, int, struct cred *,
 181                 caller_context_t *);
 182 static  int ufs_priv_access(void *, int, struct cred *);
 183 static  int ufs_eventlookup(struct vnode *, char *, struct cred *,
 184     struct vnode **);
 185 extern int as_map_locked(struct as *, caddr_t, size_t, int ((*)()), void *);
 186 
 187 /*
 188  * For lockfs: ulockfs begin/end is now inlined in the ufs_xxx functions.
 189  *
 190  * XXX - ULOCKFS in fs_pathconf and ufs_ioctl is not inlined yet.
 191  */
 192 struct vnodeops *ufs_vnodeops;
 193 
 194 /* NOTE: "not blkd" below  means that the operation isn't blocked by lockfs */
 195 const fs_operation_def_t ufs_vnodeops_template[] = {
 196         VOPNAME_OPEN,           { .vop_open = ufs_open },       /* not blkd */
 197         VOPNAME_CLOSE,          { .vop_close = ufs_close },     /* not blkd */
 198         VOPNAME_READ,           { .vop_read = ufs_read },
 199         VOPNAME_WRITE,          { .vop_write = ufs_write },
 200         VOPNAME_IOCTL,          { .vop_ioctl = ufs_ioctl },
 201         VOPNAME_GETATTR,        { .vop_getattr = ufs_getattr },
 202         VOPNAME_SETATTR,        { .vop_setattr = ufs_setattr },
 203         VOPNAME_ACCESS,         { .vop_access = ufs_access },
 204         VOPNAME_LOOKUP,         { .vop_lookup = ufs_lookup },
 205         VOPNAME_CREATE,         { .vop_create = ufs_create },
 206         VOPNAME_REMOVE,         { .vop_remove = ufs_remove },
 207         VOPNAME_LINK,           { .vop_link = ufs_link },
 208         VOPNAME_RENAME,         { .vop_rename = ufs_rename },
 209         VOPNAME_MKDIR,          { .vop_mkdir = ufs_mkdir },
 210         VOPNAME_RMDIR,          { .vop_rmdir = ufs_rmdir },
 211         VOPNAME_READDIR,        { .vop_readdir = ufs_readdir },
 212         VOPNAME_SYMLINK,        { .vop_symlink = ufs_symlink },
 213         VOPNAME_READLINK,       { .vop_readlink = ufs_readlink },
 214         VOPNAME_FSYNC,          { .vop_fsync = ufs_fsync },
 215         VOPNAME_INACTIVE,       { .vop_inactive = ufs_inactive }, /* not blkd */
 216         VOPNAME_FID,            { .vop_fid = ufs_fid },
 217         VOPNAME_RWLOCK,         { .vop_rwlock = ufs_rwlock },   /* not blkd */
 218         VOPNAME_RWUNLOCK,       { .vop_rwunlock = ufs_rwunlock }, /* not blkd */
 219         VOPNAME_SEEK,           { .vop_seek = ufs_seek },
 220         VOPNAME_FRLOCK,         { .vop_frlock = ufs_frlock },
 221         VOPNAME_SPACE,          { .vop_space = ufs_space },
 222         VOPNAME_GETPAGE,        { .vop_getpage = ufs_getpage },
 223         VOPNAME_PUTPAGE,        { .vop_putpage = ufs_putpage },
 224         VOPNAME_MAP,            { .vop_map = ufs_map },
 225         VOPNAME_ADDMAP,         { .vop_addmap = ufs_addmap },   /* not blkd */
 226         VOPNAME_DELMAP,         { .vop_delmap = ufs_delmap },   /* not blkd */
 227         VOPNAME_POLL,           { .vop_poll = ufs_poll },       /* not blkd */
 228         VOPNAME_DUMP,           { .vop_dump = ufs_dump },
 229         VOPNAME_PATHCONF,       { .vop_pathconf = ufs_l_pathconf },
 230         VOPNAME_PAGEIO,         { .vop_pageio = ufs_pageio },
 231         VOPNAME_DUMPCTL,        { .vop_dumpctl = ufs_dumpctl },
 232         VOPNAME_GETSECATTR,     { .vop_getsecattr = ufs_getsecattr },
 233         VOPNAME_SETSECATTR,     { .vop_setsecattr = ufs_setsecattr },
 234         VOPNAME_VNEVENT,        { .vop_vnevent = fs_vnevent_support },
 235         NULL,                   NULL
 236 };
 237 
 238 #define MAX_BACKFILE_COUNT      9999
 239 
 240 /*
 241  * Created by ufs_dumpctl() to store a file's disk block info into memory.
 242  * Used by ufs_dump() to dump data to disk directly.
 243  */
 244 struct dump {
 245         struct inode    *ip;            /* the file we contain */
 246         daddr_t         fsbs;           /* number of blocks stored */
 247         struct timeval32 time;          /* time stamp for the struct */
 248         daddr32_t       dblk[1];        /* place holder for block info */
 249 };
 250 
 251 static struct dump *dump_info = NULL;
 252 
 253 /*
 254  * Previously there was no special action required for ordinary files.
 255  * (Devices are handled through the device file system.)




 176 static  daddr32_t *save_dblks(struct inode *, struct ufsvfs *, daddr32_t *,
 177                 daddr32_t *, int, int);
 178 static  int ufs_getsecattr(struct vnode *, vsecattr_t *, int, struct cred *,
 179                 caller_context_t *);
 180 static  int ufs_setsecattr(struct vnode *, vsecattr_t *, int, struct cred *,
 181                 caller_context_t *);
 182 static  int ufs_priv_access(void *, int, struct cred *);
 183 static  int ufs_eventlookup(struct vnode *, char *, struct cred *,
 184     struct vnode **);
 185 extern int as_map_locked(struct as *, caddr_t, size_t, int ((*)()), void *);
 186 
 187 /*
 188  * For lockfs: ulockfs begin/end is now inlined in the ufs_xxx functions.
 189  *
 190  * XXX - ULOCKFS in fs_pathconf and ufs_ioctl is not inlined yet.
 191  */
 192 struct vnodeops *ufs_vnodeops;
 193 
 194 /* NOTE: "not blkd" below  means that the operation isn't blocked by lockfs */
 195 const fs_operation_def_t ufs_vnodeops_template[] = {
 196         { VOPNAME_OPEN,         { .vop_open = ufs_open } },     /* not blkd */
 197         { VOPNAME_CLOSE,        { .vop_close = ufs_close } },   /* not blkd */
 198         { VOPNAME_READ,         { .vop_read = ufs_read } },
 199         { VOPNAME_WRITE,        { .vop_write = ufs_write } },
 200         { VOPNAME_IOCTL,        { .vop_ioctl = ufs_ioctl } },
 201         { VOPNAME_GETATTR,      { .vop_getattr = ufs_getattr } },
 202         { VOPNAME_SETATTR,      { .vop_setattr = ufs_setattr } },
 203         { VOPNAME_ACCESS,       { .vop_access = ufs_access } },
 204         { VOPNAME_LOOKUP,       { .vop_lookup = ufs_lookup } },
 205         { VOPNAME_CREATE,       { .vop_create = ufs_create } },
 206         { VOPNAME_REMOVE,       { .vop_remove = ufs_remove } },
 207         { VOPNAME_LINK,         { .vop_link = ufs_link } },
 208         { VOPNAME_RENAME,       { .vop_rename = ufs_rename } },
 209         { VOPNAME_MKDIR,        { .vop_mkdir = ufs_mkdir } },
 210         { VOPNAME_RMDIR,        { .vop_rmdir = ufs_rmdir } },
 211         { VOPNAME_READDIR,      { .vop_readdir = ufs_readdir } },
 212         { VOPNAME_SYMLINK,      { .vop_symlink = ufs_symlink } },
 213         { VOPNAME_READLINK,     { .vop_readlink = ufs_readlink } },
 214         { VOPNAME_FSYNC,        { .vop_fsync = ufs_fsync } },
 215         { VOPNAME_INACTIVE,     { .vop_inactive = ufs_inactive } }, /* !blkd */
 216         { VOPNAME_FID,          { .vop_fid = ufs_fid } },
 217         { VOPNAME_RWLOCK,       { .vop_rwlock = ufs_rwlock } }, /* not blkd */
 218         { VOPNAME_RWUNLOCK,     { .vop_rwunlock = ufs_rwunlock } }, /* !blkd */
 219         { VOPNAME_SEEK,         { .vop_seek = ufs_seek } },
 220         { VOPNAME_FRLOCK,       { .vop_frlock = ufs_frlock } },
 221         { VOPNAME_SPACE,        { .vop_space = ufs_space } },
 222         { VOPNAME_GETPAGE,      { .vop_getpage = ufs_getpage } },
 223         { VOPNAME_PUTPAGE,      { .vop_putpage = ufs_putpage } },
 224         { VOPNAME_MAP,          { .vop_map = ufs_map } },
 225         { VOPNAME_ADDMAP,       { .vop_addmap = ufs_addmap } }, /* not blkd */
 226         { VOPNAME_DELMAP,       { .vop_delmap = ufs_delmap } }, /* not blkd */
 227         { VOPNAME_POLL,         { .vop_poll = ufs_poll } },     /* not blkd */
 228         { VOPNAME_DUMP,         { .vop_dump = ufs_dump } },
 229         { VOPNAME_PATHCONF,     { .vop_pathconf = ufs_l_pathconf } },
 230         { VOPNAME_PAGEIO,       { .vop_pageio = ufs_pageio } },
 231         { VOPNAME_DUMPCTL,      { .vop_dumpctl = ufs_dumpctl } },
 232         { VOPNAME_GETSECATTR,   { .vop_getsecattr = ufs_getsecattr } },
 233         { VOPNAME_SETSECATTR,   { .vop_setsecattr = ufs_setsecattr } },
 234         { VOPNAME_VNEVENT,      { .vop_vnevent = fs_vnevent_support } },
 235         { NULL,                 { NULL } }
 236 };
 237 
 238 #define MAX_BACKFILE_COUNT      9999
 239 
 240 /*
 241  * Created by ufs_dumpctl() to store a file's disk block info into memory.
 242  * Used by ufs_dump() to dump data to disk directly.
 243  */
 244 struct dump {
 245         struct inode    *ip;            /* the file we contain */
 246         daddr_t         fsbs;           /* number of blocks stored */
 247         struct timeval32 time;          /* time stamp for the struct */
 248         daddr32_t       dblk[1];        /* place holder for block info */
 249 };
 250 
 251 static struct dump *dump_info = NULL;
 252 
 253 /*
 254  * Previously there was no special action required for ordinary files.
 255  * (Devices are handled through the device file system.)