Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/vscan/vscan_svc.c
          +++ new/usr/src/uts/common/io/vscan/vscan_svc.c
↓ open down ↓ 33 lines elided ↑ open up ↑
  34   34  #include <sys/cmn_err.h>
  35   35  #include <sys/vnode.h>
  36   36  #include <fs/fs_subr.h>
  37   37  #include <sys/types.h>
  38   38  #include <sys/file.h>
  39   39  #include <sys/disp.h>
  40   40  #include <sys/sdt.h>
  41   41  #include <sys/cred.h>
  42   42  #include <sys/list.h>
  43   43  #include <sys/vscan.h>
       44 +#include <sys/sysmacros.h>
  44   45  
  45   46  #define VS_REQ_MAGIC            0x52515354 /* 'RQST' */
  46   47  
  47   48  #define VS_REQS_DEFAULT         20000   /* pending scan requests - reql */
  48   49  #define VS_NODES_DEFAULT        128     /* concurrent file scans */
  49   50  #define VS_WORKERS_DEFAULT      32      /* worker threads */
  50   51  #define VS_SCANWAIT_DEFAULT     15*60   /* seconds to wait for scan result */
  51   52  #define VS_REQL_HANDLER_TIMEOUT 30
  52   53  #define VS_EXT_RECURSE_DEPTH    8
  53   54  
  54   55  /* access derived from scan result (VS_STATUS_XXX) and file attributes */
  55   56  #define VS_ACCESS_UNDEFINED     0
  56   57  #define VS_ACCESS_ALLOW         1       /* return 0 */
  57   58  #define VS_ACCESS_DENY          2       /* return EACCES */
  58   59  
  59   60  #define tolower(C)      (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C))
  60      -#define offsetof(s, m)  (size_t)(&(((s *)0)->m))
  61   61  
  62   62  /* global variables - tunable via /etc/system */
  63   63  uint32_t vs_reqs_max = VS_REQS_DEFAULT; /* max scan requests */
  64   64  uint32_t vs_nodes_max = VS_NODES_DEFAULT; /* max in-progress scan requests */
  65   65  uint32_t vs_workers = VS_WORKERS_DEFAULT; /* max workers send reqs to vscand */
  66   66  uint32_t vs_scan_wait = VS_SCANWAIT_DEFAULT; /* secs to wait for scan result */
  67   67  
  68   68  
  69   69  /*
  70   70   * vscan_svc_state
↓ open down ↓ 1297 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX