Print this page
195 Need replacement for nfs/lockd+klm
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Jeremy Jones <jeremy@delphix.com>
Reviewed by: Jeff Biseda <jbiseda@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/nfs/lm.h
          +++ new/usr/src/uts/common/nfs/lm.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
       27 +/*
       28 + * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       29 + */
       30 +
  27   31  #ifndef _NFS_LM_H
  28   32  #define _NFS_LM_H
  29   33  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   34  /*
  33   35   * Interface definitions for the NFSv2/v3 lock manager.
  34   36   */
  35   37  
  36   38  #ifdef __cplusplus
  37   39  extern "C" {
  38   40  #endif
  39   41  
  40   42  #include <sys/cred.h>
  41   43  #include <sys/fcntl.h>
  42   44  #include <sys/types.h>
  43   45  #include <sys/vnode.h>
  44   46  #include <rpc/rpc.h>
  45      -#include <nfs/export.h>
  46   47  
  47   48  #ifdef _KERNEL
  48   49  
  49   50  /*
  50   51   * Common interfaces.
  51   52   */
  52   53  
       54 +struct exportinfo;
       55 +
  53   56  /*
  54   57   * The numeric sysid is used to identify a host and transport.
  55   58   *
  56   59   * The local locking code uses (pid, sysid) to uniquely identify a process.
  57   60   * This means that the client-side code must doctor up the sysid before
  58   61   * registering a lock, so that the local locking code doesn't confuse a
  59   62   * remote process with a local process just because they have the same pid.
  60   63   * We currently do this by ORing LM_SYSID_CLIENT into the sysid before
  61   64   * registering a lock.
  62   65   *
↓ open down ↓ 84 lines elided ↑ open up ↑
 147  150   */
 148  151  
 149  152  /*
 150  153   * Return non-zero if the given local vnode is in use.
 151  154   */
 152  155  extern int lm_vp_active(const struct vnode *);
 153  156  
 154  157  extern sysid_t             lm_alloc_sysidt(void);
 155  158  extern void                lm_free_sysidt(sysid_t);
 156  159  
 157      -#else /* _KERNEL */
      160 +#endif /* _KERNEL */
 158  161  
 159  162  #ifdef __STDC__
 160  163  extern int lm_shutdown(void);
 161  164  #else
 162  165  extern int lm_shutdown();
 163  166  #endif /* __STDC__ */
 164  167  
 165      -#endif /* _KERNEL */
 166      -
 167  168  #ifdef __cplusplus
 168  169  }
 169  170  #endif
 170  171  
 171  172  #endif /* _NFS_LM_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX