Print this page
NEX-3758 Support for remote stale lock detection
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/klm/klmmod.c
          +++ new/usr/src/uts/common/klm/klmmod.c
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy is of the CDDL is also available via the Internet
   9    9   * at http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13      - * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       13 + * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  14   14   * Copyright (c) 2012 by Delphix. All rights reserved.
  15   15   */
  16   16  
  17   17  /*
  18   18   * NFS Lock Manager, server-side and common.
  19   19   *
  20   20   * This file contains all the external entry points of klmmod.
  21   21   * Basically, this is the "glue" to the BSD nlm code.
  22   22   */
  23   23  
↓ open down ↓ 105 lines elided ↑ open up ↑
 129  129          int retval;
 130  130  
 131  131          rw_init(&lm_lck, NULL, RW_DEFAULT, NULL);
 132  132          nlm_init();
 133  133  
 134  134          zone_key_create(&nlm_zone_key, lm_zone_init, NULL, lm_zone_fini);
 135  135          /* Per-zone lockmgr data.  See: os/flock.c */
 136  136          zone_key_create(&flock_zone_key, flk_zone_init, NULL, flk_zone_fini);
 137  137  
 138  138          retval = mod_install(&modlinkage);
 139      -        if (retval == 0)
      139 +        if (retval == 0) {
      140 +                flk_add_sysid_to_host_translator(nlm_sysid_to_host);
 140  141                  return (0);
      142 +        }
 141  143  
 142  144          /*
 143  145           * mod_install failed! undo above, reverse order
 144  146           */
 145  147  
 146  148          (void) zone_key_delete(flock_zone_key);
 147  149          flock_zone_key = ZONE_KEY_UNINITIALIZED;
 148  150          (void) zone_key_delete(nlm_zone_key);
 149  151          rw_destroy(&lm_lck);
 150  152  
↓ open down ↓ 383 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX