Print this page
cstyle sort of updates
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/vfs.c
          +++ new/usr/src/uts/common/fs/vfs.c
↓ open down ↓ 311 lines elided ↑ open up ↑
 312  312  /*
 313  313   * File system initialization.  vfs_setfsops() must be called from a file
 314  314   * system's init routine.
 315  315   */
 316  316  
 317  317  static int
 318  318  fs_copyfsops(const fs_operation_def_t *template, vfsops_t *actual,
 319  319      int *unused_ops)
 320  320  {
 321  321          static const fs_operation_trans_def_t vfs_ops_table[] = {
 322      -                VFSNAME_MOUNT, offsetof(vfsops_t, vfs_mount),
 323      -                        fs_nosys, fs_nosys,
      322 +                { VFSNAME_MOUNT, offsetof(vfsops_t, vfs_mount),
      323 +                        fs_nosys, fs_nosys },
 324  324  
 325      -                VFSNAME_UNMOUNT, offsetof(vfsops_t, vfs_unmount),
 326      -                        fs_nosys, fs_nosys,
      325 +                { VFSNAME_UNMOUNT, offsetof(vfsops_t, vfs_unmount),
      326 +                        fs_nosys, fs_nosys },
 327  327  
 328      -                VFSNAME_ROOT, offsetof(vfsops_t, vfs_root),
 329      -                        fs_nosys, fs_nosys,
      328 +                { VFSNAME_ROOT, offsetof(vfsops_t, vfs_root),
      329 +                        fs_nosys, fs_nosys },
 330  330  
 331      -                VFSNAME_STATVFS, offsetof(vfsops_t, vfs_statvfs),
 332      -                        fs_nosys, fs_nosys,
      331 +                { VFSNAME_STATVFS, offsetof(vfsops_t, vfs_statvfs),
      332 +                        fs_nosys, fs_nosys },
 333  333  
 334      -                VFSNAME_SYNC, offsetof(vfsops_t, vfs_sync),
      334 +                { VFSNAME_SYNC, offsetof(vfsops_t, vfs_sync),
 335  335                          (fs_generic_func_p) fs_sync,
 336      -                        (fs_generic_func_p) fs_sync,    /* No errors allowed */
      336 +                        (fs_generic_func_p) fs_sync },  /* No errors allowed */
 337  337  
 338      -                VFSNAME_VGET, offsetof(vfsops_t, vfs_vget),
 339      -                        fs_nosys, fs_nosys,
      338 +                { VFSNAME_VGET, offsetof(vfsops_t, vfs_vget),
      339 +                        fs_nosys, fs_nosys },
 340  340  
 341      -                VFSNAME_MOUNTROOT, offsetof(vfsops_t, vfs_mountroot),
 342      -                        fs_nosys, fs_nosys,
      341 +                { VFSNAME_MOUNTROOT, offsetof(vfsops_t, vfs_mountroot),
      342 +                        fs_nosys, fs_nosys },
 343  343  
 344      -                VFSNAME_FREEVFS, offsetof(vfsops_t, vfs_freevfs),
      344 +                { VFSNAME_FREEVFS, offsetof(vfsops_t, vfs_freevfs),
 345  345                          (fs_generic_func_p)fs_freevfs,
 346      -                        (fs_generic_func_p)fs_freevfs,  /* Shouldn't fail */
      346 +                        (fs_generic_func_p)fs_freevfs }, /* Shouldn't fail */
 347  347  
 348      -                VFSNAME_VNSTATE, offsetof(vfsops_t, vfs_vnstate),
      348 +                { VFSNAME_VNSTATE, offsetof(vfsops_t, vfs_vnstate),
 349  349                          (fs_generic_func_p)fs_nosys,
 350      -                        (fs_generic_func_p)fs_nosys,
      350 +                        (fs_generic_func_p)fs_nosys },
 351  351  
 352      -                NULL, 0, NULL, NULL
      352 +                { NULL, 0, NULL, NULL }
 353  353          };
 354  354  
 355  355          return (fs_build_vector(actual, unused_ops, vfs_ops_table, template));
 356  356  }
 357  357  
 358  358  void
 359  359  zfs_boot_init(void)
 360  360  {
 361  361          if (strcmp(rootfs.bo_fstype, MNTTYPE_ZFS) == 0)
 362  362                  spa_boot_init();
↓ open down ↓ 2460 lines elided ↑ open up ↑
2823 2823          vap->va_atime = vap->va_mtime;
2824 2824          return (0);
2825 2825  }
2826 2826  
2827 2827  static void
2828 2828  vfs_mnttabvp_setup(void)
2829 2829  {
2830 2830          vnode_t *tvp;
2831 2831          vnodeops_t *vfs_mntdummyvnops;
2832 2832          const fs_operation_def_t mnt_dummyvnodeops_template[] = {
2833      -                VOPNAME_READ,           { .vop_read = vfs_mntdummyread },
2834      -                VOPNAME_WRITE,          { .vop_write = vfs_mntdummywrite },
2835      -                VOPNAME_GETATTR,        { .vop_getattr = vfs_mntdummygetattr },
2836      -                VOPNAME_VNEVENT,        { .vop_vnevent = fs_vnevent_support },
2837      -                NULL,                   NULL
     2833 +                { VOPNAME_READ,         { .vop_read = vfs_mntdummyread } },
     2834 +                { VOPNAME_WRITE,        { .vop_write = vfs_mntdummywrite } },
     2835 +                { VOPNAME_GETATTR,      { .vop_getattr = vfs_mntdummygetattr }},
     2836 +                { VOPNAME_VNEVENT,      { .vop_vnevent = fs_vnevent_support } },
     2837 +                { NULL,                 { NULL } }
2838 2838          };
2839 2839  
2840 2840          if (vn_make_ops("mnttab", mnt_dummyvnodeops_template,
2841 2841              &vfs_mntdummyvnops) != 0) {
2842 2842                  cmn_err(CE_WARN, "vfs_mnttabvp_setup: vn_make_ops failed");
2843 2843                  /* Shouldn't happen, but not bad enough to panic */
2844 2844                  return;
2845 2845          }
2846 2846  
2847 2847          /*
↓ open down ↓ 1366 lines elided ↑ open up ↑
4214 4214   */
4215 4215  void
4216 4216  vfsinit(void)
4217 4217  {
4218 4218          struct vfssw *vswp;
4219 4219          int error;
4220 4220          extern int vopstats_enabled;
4221 4221          extern void vopstats_startup();
4222 4222  
4223 4223          static const fs_operation_def_t EIO_vfsops_template[] = {
4224      -                VFSNAME_MOUNT,          { .error = vfs_EIO },
4225      -                VFSNAME_UNMOUNT,        { .error = vfs_EIO },
4226      -                VFSNAME_ROOT,           { .error = vfs_EIO },
4227      -                VFSNAME_STATVFS,        { .error = vfs_EIO },
4228      -                VFSNAME_SYNC,           { .vfs_sync = vfs_EIO_sync },
4229      -                VFSNAME_VGET,           { .error = vfs_EIO },
4230      -                VFSNAME_MOUNTROOT,      { .error = vfs_EIO },
4231      -                VFSNAME_FREEVFS,        { .error = vfs_EIO },
4232      -                VFSNAME_VNSTATE,        { .error = vfs_EIO },
4233      -                NULL, NULL
     4224 +                { VFSNAME_MOUNT,        { .error = vfs_EIO } },
     4225 +                { VFSNAME_UNMOUNT,      { .error = vfs_EIO } },
     4226 +                { VFSNAME_ROOT,         { .error = vfs_EIO } },
     4227 +                { VFSNAME_STATVFS,      { .error = vfs_EIO } },
     4228 +                { VFSNAME_SYNC,         { .vfs_sync = vfs_EIO_sync } },
     4229 +                { VFSNAME_VGET,         { .error = vfs_EIO } },
     4230 +                { VFSNAME_MOUNTROOT,    { .error = vfs_EIO } },
     4231 +                { VFSNAME_FREEVFS,      { .error = vfs_EIO } },
     4232 +                { VFSNAME_VNSTATE,      { .error = vfs_EIO } },
     4233 +                { NULL,                 { NULL } }
4234 4234          };
4235 4235  
4236 4236          static const fs_operation_def_t stray_vfsops_template[] = {
4237      -                VFSNAME_MOUNT,          { .error = vfsstray },
4238      -                VFSNAME_UNMOUNT,        { .error = vfsstray },
4239      -                VFSNAME_ROOT,           { .error = vfsstray },
4240      -                VFSNAME_STATVFS,        { .error = vfsstray },
4241      -                VFSNAME_SYNC,           { .vfs_sync = vfsstray_sync },
4242      -                VFSNAME_VGET,           { .error = vfsstray },
4243      -                VFSNAME_MOUNTROOT,      { .error = vfsstray },
4244      -                VFSNAME_FREEVFS,        { .error = vfsstray },
4245      -                VFSNAME_VNSTATE,        { .error = vfsstray },
4246      -                NULL, NULL
     4237 +                { VFSNAME_MOUNT,        { .error = vfsstray } },
     4238 +                { VFSNAME_UNMOUNT,      { .error = vfsstray } },
     4239 +                { VFSNAME_ROOT,         { .error = vfsstray } },
     4240 +                { VFSNAME_STATVFS,      { .error = vfsstray } },
     4241 +                { VFSNAME_SYNC,         { .vfs_sync = vfsstray_sync } },
     4242 +                { VFSNAME_VGET,         { .error = vfsstray } },
     4243 +                { VFSNAME_MOUNTROOT,    { .error = vfsstray } },
     4244 +                { VFSNAME_FREEVFS,      { .error = vfsstray } },
     4245 +                { VFSNAME_VNSTATE,      { .error = vfsstray } },
     4246 +                { NULL,                 { NULL } }
4247 4247          };
4248 4248  
4249 4249          /* Create vfs cache */
4250 4250          vfs_cache = kmem_cache_create("vfs_cache", sizeof (struct vfs),
4251 4251              sizeof (uintptr_t), NULL, NULL, NULL, NULL, NULL, 0);
4252 4252  
4253 4253          /* Initialize the vnode cache (file systems may use it during init). */
4254 4254          vn_create_cache();
4255 4255  
4256 4256          /* Setup event monitor framework */
↓ open down ↓ 576 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX