Print this page
4827 nfs4: slow file locking
4837 NFSv4 client lock retry delay upper limit should be shorter

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_rnode.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_rnode.c
↓ open down ↓ 1604 lines elided ↑ open up ↑
1605 1605          sp = find_nfs4_server(mi);
1606 1606          if (sp != NULL) {
1607 1607                  clientid = sp->clientid;
1608 1608                  mutex_exit(&sp->s_lock);
1609 1609                  nfs4_server_rele(sp);
1610 1610          }
1611 1611          return (clientid);
1612 1612  }
1613 1613  
1614 1614  /*
1615      - * Return the current lease time for the server associated with the given
1616      - * file.  Note that the lease time could change immediately after this
1617      - * call.
1618      - */
1619      -
1620      -time_t
1621      -r2lease_time(rnode4_t *rp)
1622      -{
1623      -        nfs4_server_t   *sp;
1624      -        time_t          lease_time;
1625      -        mntinfo4_t      *mi = VTOMI4(RTOV4(rp));
1626      -
1627      -        (void) nfs_rw_enter_sig(&mi->mi_recovlock, RW_READER, 0);
1628      -
1629      -        /* this locks down sp if it is found */
1630      -        sp = find_nfs4_server(VTOMI4(RTOV4(rp)));
1631      -
1632      -        if (VTOMI4(RTOV4(rp))->mi_vfsp->vfs_flag & VFS_UNMOUNTED) {
1633      -                if (sp != NULL) {
1634      -                        mutex_exit(&sp->s_lock);
1635      -                        nfs4_server_rele(sp);
1636      -                }
1637      -                nfs_rw_exit(&mi->mi_recovlock);
1638      -                return (1);             /* 1 second */
1639      -        }
1640      -
1641      -        ASSERT(sp != NULL);
1642      -
1643      -        lease_time = sp->s_lease_time;
1644      -
1645      -        mutex_exit(&sp->s_lock);
1646      -        nfs4_server_rele(sp);
1647      -        nfs_rw_exit(&mi->mi_recovlock);
1648      -
1649      -        return (lease_time);
1650      -}
1651      -
1652      -/*
1653 1615   * Return a list with information about all the known open instances for
1654 1616   * a filesystem. The caller must call r4releopenlist() when done with the
1655 1617   * list.
1656 1618   *
1657 1619   * We are safe at looking at os_valid and os_pending_close across dropping
1658 1620   * the 'os_sync_lock' to count up the number of open streams and then
1659 1621   * allocate memory for the osp list due to:
1660 1622   *      -Looking at os_pending_close is safe since this routine is
1661 1623   *      only called via recovery, and os_pending_close can only be set via
1662 1624   *      a non-recovery operation (which are all blocked when recovery
↓ open down ↓ 362 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX