From patchwork Thu Sep 26 18:40:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 2950211 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 16A27BFF0B for ; Thu, 26 Sep 2013 18:41:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DA8A2017B for ; Thu, 26 Sep 2013 18:40:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 059ED202D1 for ; Thu, 26 Sep 2013 18:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753934Ab3IZSkw (ORCPT ); Thu, 26 Sep 2013 14:40:52 -0400 Received: from mail-qe0-f52.google.com ([209.85.128.52]:41957 "EHLO mail-qe0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047Ab3IZSkw (ORCPT ); Thu, 26 Sep 2013 14:40:52 -0400 Received: by mail-qe0-f52.google.com with SMTP id i11so1082535qej.25 for ; Thu, 26 Sep 2013 11:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=qYzQtO/WJEeLyrjlN7UT8Rzyi50tyi3oIZ/GedJ4UBU=; b=ltxm+fBX2knNXVrZZdBtbWAG1s9zJvM409HFFgoP3a41XMolC7VghsQ2T3h5bmk1XX VUWfl4z4yRoqG+P7qJG2cFvbzx4XR1AQPnozOFgroAMr15RbKut1Ye8qhlYCiGpgsKxy t6iGdeBcpWrOyURB1ecp4Np88ALVKIUQszJTujySjy5zrPm7C/6KqWyK8URAE7l/PLDr SKHuEP+A/7UZ3+FubnFYpt1yp+l8PEyQWpanWzI3kU2/qGL4g5mO5FjRhHQL391vk443 kLHr9KV/bMWpzH120zhc/SE4B2t1Z9in3cKS+1WB4Ie9dnmmPndh1sZrPVmMRHbCyX3X OYTQ== X-Received: by 10.229.48.137 with SMTP id r9mr3691135qcf.6.1380220851640; Thu, 26 Sep 2013 11:40:51 -0700 (PDT) Received: from bhalevy-lt.il.tonian.com.com (nat-pool-bos-u.redhat.com. [66.187.233.207]) by mx.google.com with ESMTPSA id u8sm5123248qef.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 26 Sep 2013 11:40:51 -0700 (PDT) From: Benny Halevy To: " J. Bruce Fields" Cc: linux-nfs@vger.kernel.org Subject: [PATCH RFC v0 14/49] pnfsd: provide helper for xdr encoding of deviceid Date: Thu, 26 Sep 2013 14:40:48 -0400 Message-Id: <1380220848-13325-1-git-send-email-bhalevy@primarydata.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <52447EA0.7070004@primarydata.com> References: <52447EA0.7070004@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Signed-off-by: Benny Halevy --- include/linux/nfsd/nfsd4_pnfs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/nfsd/nfsd4_pnfs.h b/include/linux/nfsd/nfsd4_pnfs.h index 53a0bb7..28f9daa 100644 --- a/include/linux/nfsd/nfsd4_pnfs.h +++ b/include/linux/nfsd/nfsd4_pnfs.h @@ -42,6 +42,13 @@ struct nfsd4_pnfs_deviceid { u64 devid; /* filesystem-wide unique device ID */ }; +static inline __be32 *nfsd4_encode_deviceid(__be32 *p, + const struct nfsd4_pnfs_deviceid *dp) +{ + p = exp_xdr_encode_u64(p, dp->sbid); + return exp_xdr_encode_u64(p, dp->devid); +} + struct nfsd4_pnfs_dev_iter_res { u64 gd_cookie; /* request/repsonse */ u64 gd_verf; /* request/repsonse */