From owner-svn-src-head@FreeBSD.ORG Sat Jun 22 18:16:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3521062A; Sat, 22 Jun 2013 18:16:34 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x235.google.com (mail-ee0-x235.google.com [IPv6:2a00:1450:4013:c00::235]) by mx1.freebsd.org (Postfix) with ESMTP id ED8371825; Sat, 22 Jun 2013 18:16:32 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id c41so5250301eek.12 for ; Sat, 22 Jun 2013 11:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=oMEIIkjipJYe79L4RwRdMYT7fmhgptV9OptnF6QzRB4=; b=O3mtoyCQUTafCTqbZXcgcAbZVhaHMdTw6wGVxKvygu33nMDJEOUgK8szwRFPxhXtnV ZskBA0ZoHaCA4a8gvWMSis4iYjyMuxDy2L84/Lasic9exh2QugAofhAm9ifPl8JmiUJP tSuz+GqQ2E+5dRYnfyP3a8wiaIRLNJncqf83pud3pH0AHkLTFZCi4gdo4twLcHpho/CE uZh47VF0a1v3+oMJh8a17uxEM3DVjZ1yDIjh2aVvjWpsejy8mRN4mMSOLzhQodTna8GI nT5JLsoD4ZW8hD0NttZCPt8KIiEYKJCBaHEsB98p0rukgwI982QbNlzlr15LawrZwN1H zJGw== MIME-Version: 1.0 X-Received: by 10.14.1.70 with SMTP id 46mr17832318eec.82.1371924992012; Sat, 22 Jun 2013 11:16:32 -0700 (PDT) Sender: hiren.panchasara@gmail.com Received: by 10.14.119.203 with HTTP; Sat, 22 Jun 2013 11:16:31 -0700 (PDT) In-Reply-To: <20130622042219.GC1888@glenbarber.us> References: <201306212246.r5LMkHBY070137@svn.freebsd.org> <20130622042219.GC1888@glenbarber.us> Date: Sat, 22 Jun 2013 11:16:31 -0700 X-Google-Sender-Auth: uaOagIKZcvJNqoxZZxRvbIcQmdk Message-ID: Subject: Re: svn commit: r252074 - head/sys/fs/nfsclient From: hiren panchasara To: Glen Barber , Hiroki Sato Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head , Rick Macklem , svn-src-all , src-committers X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 22 Jun 2013 18:16:34 -0000 + Hiroki Hiroki seems to have a patch fixing it. http://lists.freebsd.org/pipermail/freebsd-current/2013-June/042605.html cheers, Hiren On Fri, Jun 21, 2013 at 9:22 PM, Glen Barber wrote: > On Fri, Jun 21, 2013 at 10:46:17PM +0000, Rick Macklem wrote: >> Author: rmacklem >> Date: Fri Jun 21 22:46:16 2013 >> New Revision: 252074 >> URL: http://svnweb.freebsd.org/changeset/base/252074 >> >> Log: >> The NFSv4.1 LayoutCommit operation requires a valid offset and length. >> (0, 0 is not sufficient) This patch a loop for each file layout, using >> the offset, length of each file layout in a separate LayoutCommit. >> >> Modified: >> head/sys/fs/nfsclient/nfs_clstate.c >> >> Modified: head/sys/fs/nfsclient/nfs_clstate.c >> ============================================================================== >> --- head/sys/fs/nfsclient/nfs_clstate.c Fri Jun 21 22:45:03 2013 (r252073) >> +++ head/sys/fs/nfsclient/nfs_clstate.c Fri Jun 21 22:46:16 2013 (r252074) >> @@ -5145,16 +5145,28 @@ static void >> nfscl_dolayoutcommit(struct nfsmount *nmp, struct nfscllayout *lyp, >> struct ucred *cred, NFSPROC_T *p) >> { >> + struct nfsclflayout *flp; >> + uint64_t len; >> int error; >> >> - error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, lyp->nfsly_fhlen, >> - 0, 0, 0, lyp->nfsly_lastbyte, &lyp->nfsly_stateid, >> - NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL); >> - if (error == NFSERR_NOTSUPP) { >> - /* If the server doesn't want it, don't bother doing it. */ >> - NFSLOCKMNT(nmp); >> - nmp->nm_state |= NFSSTA_NOLAYOUTCOMMIT; >> - NFSUNLOCKMNT(nmp); >> + LIST_FOREACH(flp, &lyp->nfsly_flayrw, nfsfl_list) { >> + if (flp->nfsfl_off <= lyp->nfsly_lastbyte) { >> + len = flp->nfsfl_end - flp->nfsfl_off; >> + error = nfsrpc_layoutcommit(nmp, lyp->nfsly_fh, >> + lyp->nfsly_fhlen, 0, flp->nfsfl_off, len, >> + lyp->nfsly_lastbyte, &lyp->nfsly_stateid, >> + NFSLAYOUT_NFSV4_1_FILES, 0, NULL, cred, p, NULL); >> + NFSCL_DEBUG(4, "layoutcommit err=%d off=%qd len=%qd " >> + "lastbyte=%qd\n", error, flp->nfsfl_off, len, >> + lyp->nfsly_lastbyte); >> + if (error == NFSERR_NOTSUPP) { >> + /* If not supported, don't bother doing it. */ >> + NFSLOCKMNT(nmp); >> + nmp->nm_state |= NFSSTA_NOLAYOUTCOMMIT; >> + NFSUNLOCKMNT(nmp); >> + break; >> + } >> + } >> } >> } >> > > > This breaks head/. > > /src/sys/fs/nfsclient/nfs_clstate.c:5161:8: error: format specifies type 'long long' but the > argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] > lyp->nfsly_lastbyte); > ^~~~~~~~~~~~~~~~~~~ > /src/sys/fs/nfs/nfscl.h:74:11: note: expanded from macro 'NFSCL_DEBUG' > printf(__VA_ARGS__); \ > ^ > 3 errors generated. > *** Error code 1 > > Stop. > make: stopped in /obj/amd64.amd64/src/sys/LINT > *** Error code 1 > > Stop. > make: stopped in /src > > Glen >