From nobody@FreeBSD.org  Mon Apr  2 23:53:04 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3782016A403
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Apr 2007 23:53:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 285ED13C455
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  2 Apr 2007 23:53:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l32Nr4CN068339
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 2 Apr 2007 23:53:04 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l32Nm3OH067604;
	Mon, 2 Apr 2007 23:48:03 GMT
	(envelope-from nobody)
Message-Id: <200704022348.l32Nm3OH067604@www.freebsd.org>
Date: Mon, 2 Apr 2007 23:48:03 GMT
From: Michael Conlen<meconlen@obfuscated.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: nfs_getpages does not restart interrupted system call
X-Send-Pr-Version: www-3.0

>Number:         111164
>Category:       kern
>Synopsis:       nfs_getpages does not restart interrupted system call
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 03 00:00:23 GMT 2007
>Closed-Date:    Tue Apr 03 01:36:48 GMT 2007
>Last-Modified:  Tue Apr 03 01:36:48 GMT 2007
>Originator:     Michael Conlen
>Release:        6.2
>Organization:
>Environment:
FreeBSD web10.tarhost.com 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #7: Tue Mar 20 15:05:34 EDT 2007     root@web10.tarhost.com:/usr/obj/usr/src/sys/WWW  i386

>Description:
I see this in /var/log/messages

Apr  2 18:56:43 web10 kernel: nfs_getpages: error 4

and while a lot of errors should return an error this is just an interrupted system call. I believe this should get restarted. 
>How-To-Repeat:

>Fix:
I believe the error is in here but the function that gets called and interrupted is something being pointed to best as I can tell and I have no idea what happens if you just recall it. 

nfs_bio.c


152         bp = getpbuf(&nfs_pbuf_freecnt);
153 
154         kva = (vm_offset_t) bp->b_data;
155         pmap_qenter(kva, pages, npages);
156         cnt.v_vnodein++;
157         cnt.v_vnodepgsin += npages;
158 
159         iov.iov_base = (caddr_t) kva;
160         iov.iov_len = count;
161         uio.uio_iov = &iov;
162         uio.uio_iovcnt = 1;
163         uio.uio_offset = IDX_TO_OFF(pages[0]->pindex);
164         uio.uio_resid = count;
165         uio.uio_segflg = UIO_SYSSPACE;
166         uio.uio_rw = UIO_READ;
167         uio.uio_td = td;
168 
169         error = (nmp->nm_rpcops->nr_readrpc)(vp, &uio, cred);
170         pmap_qremove(kva, npages);
171 
172         relpbuf(bp, &nfs_pbuf_freecnt);
173 
174         if (error && (uio.uio_resid == count)) {
175                 printf("nfs_getpages: error %d\n", error);
176                 VM_OBJECT_LOCK(object);
177                 vm_page_lock_queues();
178                 for (i = 0; i < npages; ++i) {
179                         if (i != ap->a_reqpage)
180                                 vm_page_free(pages[i]);
181                 }
182                 vm_page_unlock_queues();
183                 VM_OBJECT_UNLOCK(object);
184                 return VM_PAGER_ERROR;
185         }
186 
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Apr 3 01:36:22 UTC 2007 
State-Changed-Why:  
Duplicate of kern/111163. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111164 
>Unformatted:
