From owner-svn-src-head@FreeBSD.ORG Wed Jul 22 14:37:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FC0F1065673; Wed, 22 Jul 2009 14:37:53 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED3C8FC1F; Wed, 22 Jul 2009 14:37:53 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6MEbrqO043840; Wed, 22 Jul 2009 14:37:53 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6MEbrN2043836; Wed, 22 Jul 2009 14:37:53 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200907221437.n6MEbrN2043836@svn.freebsd.org> From: Rick Macklem Date: Wed, 22 Jul 2009 14:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195821 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 14:37:56 -0000 Author: rmacklem Date: Wed Jul 22 14:37:53 2009 New Revision: 195821 URL: http://svn.freebsd.org/changeset/base/195821 Log: Add changes to the experimental nfs client to use the PBDRY flag for msleep(9) when a vnode lock or similar may be held. The changes are just a clone of the changes applied to the regular nfs client by r195703. Approved by: re (kensmith), kib (mentor) Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Wed Jul 22 14:32:38 2009 (r195820) +++ head/sys/fs/nfs/nfsport.h Wed Jul 22 14:37:53 2009 (r195821) @@ -911,6 +911,13 @@ struct nfsreq { #define NFSVNO_DELEGOK(v) (1) #endif +/* + * Define this as the flags argument for msleep() when catching signals + * while holding a resource that other threads would block for, such as + * a vnode lock. + */ +#define NFS_PCATCH (PCATCH | PBDRY) + #endif /* _KERNEL */ #endif /* _NFSPORT_NFS_H */ Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed Jul 22 14:32:38 2009 (r195820) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Jul 22 14:37:53 2009 (r195821) @@ -1357,7 +1357,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_ sigset_t oldset; ncl_set_sigmask(td, &oldset); - bp = getblk(vp, bn, size, PCATCH, 0, 0); + bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); ncl_restore_sigmask(td, &oldset); while (bp == NULL) { if (newnfs_sigintr(nmp, td)) @@ -1396,7 +1396,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag if ((nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF)) intrflg = 1; if (intrflg) { - slpflag = PCATCH; + slpflag = NFS_PCATCH; slptimeo = 2 * hz; } else { slpflag = 0; @@ -1484,7 +1484,7 @@ ncl_asyncio(struct nfsmount *nmp, struct } again: if (nmp->nm_flag & NFSMNT_INT) - slpflag = PCATCH; + slpflag = NFS_PCATCH; gotiod = FALSE; /* @@ -1553,7 +1553,7 @@ again: mtx_unlock(&ncl_iod_mutex); return (error2); } - if (slpflag == PCATCH) { + if (slpflag == NFS_PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed Jul 22 14:32:38 2009 (r195820) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed Jul 22 14:37:53 2009 (r195821) @@ -2448,7 +2448,7 @@ ncl_flush(struct vnode *vp, int waitfor, int bvecsize = 0, bveccount; if (nmp->nm_flag & NFSMNT_INT) - slpflag = PCATCH; + slpflag = NFS_PCATCH; if (!commit) passone = 0; bo = &vp->v_bufobj; @@ -2646,7 +2646,7 @@ loop: error = EINTR; goto done; } - if (slpflag == PCATCH) { + if (slpflag & PCATCH) { slpflag = 0; slptimeo = 2 * hz; } @@ -2684,7 +2684,7 @@ loop: error = newnfs_sigintr(nmp, td); if (error) goto done; - if (slpflag == PCATCH) { + if (slpflag & PCATCH) { slpflag = 0; slptimeo = 2 * hz; }