Print this page
4827 nfs4: slow file locking
4837 NFSv4 client lock retry delay upper limit should be shorter
*** 1610,1657 ****
}
return (clientid);
}
/*
- * Return the current lease time for the server associated with the given
- * file. Note that the lease time could change immediately after this
- * call.
- */
-
- time_t
- r2lease_time(rnode4_t *rp)
- {
- nfs4_server_t *sp;
- time_t lease_time;
- mntinfo4_t *mi = VTOMI4(RTOV4(rp));
-
- (void) nfs_rw_enter_sig(&mi->mi_recovlock, RW_READER, 0);
-
- /* this locks down sp if it is found */
- sp = find_nfs4_server(VTOMI4(RTOV4(rp)));
-
- if (VTOMI4(RTOV4(rp))->mi_vfsp->vfs_flag & VFS_UNMOUNTED) {
- if (sp != NULL) {
- mutex_exit(&sp->s_lock);
- nfs4_server_rele(sp);
- }
- nfs_rw_exit(&mi->mi_recovlock);
- return (1); /* 1 second */
- }
-
- ASSERT(sp != NULL);
-
- lease_time = sp->s_lease_time;
-
- mutex_exit(&sp->s_lock);
- nfs4_server_rele(sp);
- nfs_rw_exit(&mi->mi_recovlock);
-
- return (lease_time);
- }
-
- /*
* Return a list with information about all the known open instances for
* a filesystem. The caller must call r4releopenlist() when done with the
* list.
*
* We are safe at looking at os_valid and os_pending_close across dropping
--- 1610,1619 ----