From patchwork Tue Jan 13 22:50:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 5624701 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 69991C058D for ; Tue, 13 Jan 2015 22:50:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EA9E203AE for ; Tue, 13 Jan 2015 22:50:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90950203AD for ; Tue, 13 Jan 2015 22:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752885AbbAMWuq (ORCPT ); Tue, 13 Jan 2015 17:50:46 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:45711 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbbAMWup (ORCPT ); Tue, 13 Jan 2015 17:50:45 -0500 Received: by mail-pd0-f175.google.com with SMTP id g10so5930805pdj.6 for ; Tue, 13 Jan 2015 14:50:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=EaaFaWi+sg2G5naWUD5oR3M6gDYjIwXkLsV5hEYld9A=; b=V+t52ejU4KHBua4g2o8YfDBJUL5z4AJAhenlMFkqeH/kwQgeeUAOh8PEUjHomjXQrL Zv3Dm79ICk0wvsci/Kgh4y7O6qkGwzbHLAX69YX3vYP2ITZFXlvU7ys6R1QjkablDArX hiHShYX9yW1dZAg0J7Aa1mrFeMXoPb/rHnfQZBuEXMOebYY0DgJD2wVRVmHgA0pl6ONM /2H1Kscqe2jtI3ZAKsWQ1JXOnvxhKwHw9rBgl11Nb5hnEuFwU2QOlS6aoKgloNPrisJp 4eZxsTbqcwpwX4VfMHqQ7nQJ6k2YXv3LIE8CshJPvFH5wjaFXOix1jsYu3ZJBoXb0j8a KzpA== X-Gm-Message-State: ALoCoQl12rmcuZOADtWaP8Zns850gUUBofzTKDChNYbaUkBbZNRVAYPTHvETB+9i3uAj3bmqz5OX X-Received: by 10.66.65.75 with SMTP id v11mr788419pas.81.1421189445413; Tue, 13 Jan 2015 14:50:45 -0800 (PST) Received: from kitty ([50.242.95.105]) by mx.google.com with ESMTPSA id id1sm17872453pbc.80.2015.01.13.14.50.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 14:50:44 -0800 (PST) Date: Tue, 13 Jan 2015 14:50:42 -0800 From: Tom Haynes To: Anna Schumaker Cc: Trond Myklebust , Linux NFS Mailing list Subject: Re: [PATCH v3 42/49] nfs41: add range to layoutreturn args Message-ID: <20150113225042.GE90833@kitty> References: <1420590534-84063-1-git-send-email-loghyr@primarydata.com> <1420590534-84063-43-git-send-email-loghyr@primarydata.com> <54B56EB8.2060703@Netapp.com> <20150113194245.GB90833@kitty> <54B5774D.7030907@Netapp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54B5774D.7030907@Netapp.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jan 13, 2015 at 02:51:41PM -0500, Anna Schumaker wrote: > I still think we should hold off until partial file returns are added, making it less likely that somebody will introduce a bug in the meantime. > Can you live with this: fs/nfs/nfs4xdr.c | 6 +++--- fs/nfs/pnfs.c | 4 +++- include/linux/nfs_xdr.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 3c3ff63..56d4c91 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -2012,11 +2012,11 @@ encode_layoutreturn(struct xdr_stream *xdr, p = reserve_space(xdr, 16); *p++ = cpu_to_be32(0); /* reclaim. always 0 for now */ *p++ = cpu_to_be32(args->layout_type); - *p++ = cpu_to_be32(args->iomode); + *p++ = cpu_to_be32(args->range.iomode); *p = cpu_to_be32(RETURN_FILE); p = reserve_space(xdr, 16); - p = xdr_encode_hyper(p, 0); - p = xdr_encode_hyper(p, NFS4_MAX_UINT64); + p = xdr_encode_hyper(p, args->range.offset); + p = xdr_encode_hyper(p, args->range.length); spin_lock(&args->inode->i_lock); encode_nfs4_stateid(xdr, &args->stateid); spin_unlock(&args->inode->i_lock); diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 685af4f..9549b89 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -916,7 +916,9 @@ pnfs_send_layoutreturn(struct pnfs_layout_hdr *lo, nfs4_stateid stateid, lrp->args.stateid = stateid; lrp->args.layout_type = NFS_SERVER(ino)->pnfs_curr_ld->id; lrp->args.inode = ino; - lrp->args.iomode = iomode; + lrp->args.range.iomode = iomode; + lrp->args.range.offset = 0; + lrp->args.range.length = NFS4_MAX_UINT64; lrp->args.layout = lo; lrp->clp = NFS_SERVER(ino)->nfs_client; lrp->cred = lo->plh_lc_cred; diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 6400a1e..3637923 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -293,7 +293,7 @@ struct nfs4_layoutreturn_args { struct nfs4_sequence_args seq_args; struct pnfs_layout_hdr *layout; struct inode *inode; - enum pnfs_iomode iomode; + struct pnfs_layout_range range; nfs4_stateid stateid; __u32 layout_type; };