linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Benny Halevy <bhalevy@panasas.com>,
	open-osd <osd-dev@open-osd.org>,
	NFS list <linux-nfs@vger.kernel.org>
Cc: Boaz Harrosh <"Boaz Harrosh bharrosh"@panasas.com>
Subject: [PATCH 3/8] pnfs-obj: pnfs_osd_xdr: Remove dead code and cleanup
Date: Tue, 14 Jun 2011 17:20:18 -0400	[thread overview]
Message-ID: <4DF7D092.5020405@panasas.com> (raw)
In-Reply-To: <4DF7CA2F.7030407@panasas.com>

From: Boaz Harrosh <Boaz Harrosh bharrosh@panasas.com>

* Some leftovers from ancient times.
* This file will only define common types and client API.
  Remove server from comments

Signed-off-by: Boaz Harrosh <Boaz Harrosh bharrosh@panasas.com>
---
 include/linux/pnfs_osd_xdr.h |   31 ++-----------------------------
 1 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/include/linux/pnfs_osd_xdr.h b/include/linux/pnfs_osd_xdr.h
index 76efbdd..435dd5f 100644
--- a/include/linux/pnfs_osd_xdr.h
+++ b/include/linux/pnfs_osd_xdr.h
@@ -41,9 +41,6 @@
 
 #include <linux/nfs_fs.h>
 #include <linux/nfs_page.h>
-#include <scsi/osd_protocol.h>
-
-#define PNFS_OSD_OSDNAME_MAXSIZE 256
 
 /*
  * draft-ietf-nfsv4-minorversion-22
@@ -99,12 +96,6 @@ struct pnfs_osd_objid {
 #define _DEVID_HI(oid_device_id) \
 	(unsigned long long)be64_to_cpup(((__be64 *)(oid_device_id)->data) + 1)
 
-static inline int
-pnfs_osd_objid_xdr_sz(void)
-{
-	return (NFS4_DEVICEID4_SIZE / 4) + 2 + 2;
-}
-
 enum pnfs_osd_version {
 	PNFS_OSD_MISSING              = 0,
 	PNFS_OSD_VERSION_1            = 1,
@@ -189,8 +180,6 @@ struct pnfs_osd_targetid {
 	struct nfs4_string		oti_scsi_device_id;
 };
 
-enum { PNFS_OSD_TARGETID_MAX = 1 + PNFS_OSD_OSDNAME_MAXSIZE / 4 };
-
 /*   struct netaddr4 {
  *       // see struct rpcb in RFC1833
  *       string r_netid<>;    // network id
@@ -207,12 +196,6 @@ struct pnfs_osd_targetaddr {
 	struct pnfs_osd_net_addr	ota_netaddr;
 };
 
-enum {
-	NETWORK_ID_MAX = 16 / 4,
-	UNIVERSAL_ADDRESS_MAX = 64 / 4,
-	PNFS_OSD_TARGETADDR_MAX = 3 +  NETWORK_ID_MAX + UNIVERSAL_ADDRESS_MAX,
-};
-
 struct pnfs_osd_deviceaddr {
 	struct pnfs_osd_targetid	oda_targetid;
 	struct pnfs_osd_targetaddr	oda_targetaddr;
@@ -222,15 +205,6 @@ struct pnfs_osd_deviceaddr {
 	struct nfs4_string		oda_osdname;
 };
 
-enum {
-	ODA_OSDNAME_MAX = PNFS_OSD_OSDNAME_MAXSIZE / 4,
-	PNFS_OSD_DEVICEADDR_MAX =
-		PNFS_OSD_TARGETID_MAX + PNFS_OSD_TARGETADDR_MAX +
-		2 /*oda_lun*/ +
-		1 + OSD_SYSTEMID_LEN +
-		1 + ODA_OSDNAME_MAX,
-};
-
 /* LAYOUTCOMMIT: layoutupdate */
 
 /*   union pnfs_osd_deltaspaceused4 switch (bool dsu_valid) {
@@ -279,7 +253,7 @@ struct pnfs_osd_ioerr {
 	u32			oer_errno;
 };
 
-/* OSD XDR API */
+/* OSD XDR Client API */
 /* Layout helpers */
 /* Layout decoding is done in two parts:
  * 1. First Call pnfs_osd_xdr_decode_layout_map to read in only the header part
@@ -337,8 +311,7 @@ extern int
 pnfs_osd_xdr_encode_layoutupdate(struct xdr_stream *xdr,
 				 struct pnfs_osd_layoutupdate *lou);
 
-/* osd_ioerror encoding/decoding (layout_return) */
-/* Client */
+/* osd_ioerror encoding (layout_return) */
 extern __be32 *pnfs_osd_xdr_ioerr_reserve_space(struct xdr_stream *xdr);
 extern void pnfs_osd_xdr_encode_ioerr(__be32 *p, struct pnfs_osd_ioerr *ioerr);
 
-- 
1.7.3.4


  parent reply	other threads:[~2011-06-14 21:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 20:53 [PATCHSET 0/8] pnfsd-exofs: New set of exofs pnfs export patches Boaz Harrosh
2011-06-14 21:00 ` Benny Halevy
2011-06-14 22:24   ` Benny Halevy
2011-06-14 21:02 ` [PATCH 1/8] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4 Boaz Harrosh
2011-06-14 21:02 ` [PATCH 2/8] exofs: pnfs-tree: Remove pnfs-osd private definitions Boaz Harrosh
2011-06-14 21:03 ` [PATCH 4/8] pnfsd-exofs: pnfs objects server XDR functions Boaz Harrosh
2011-06-14 21:03 ` [PATCH 5/8] pnfsd-exofs: Add pNFS export support Boaz Harrosh
2011-06-14 21:03 ` [PATCH 6/8] pnfsd-exofs: get_device_info implementation Boaz Harrosh
2011-06-14 21:03 ` [PATCH 8/8] pnfsd-exofs: layoutreturn pnfs-obj information decoding Boaz Harrosh
2011-06-14 21:20 ` Boaz Harrosh [this message]
2011-06-14 21:20 ` [PATCH 7/8] pnfsd-exofs: Recall layouts on truncate Boaz Harrosh
2011-06-14 21:32 ` [PATCHSET 0/10] pnfsd-exofs: SQUASHMES that went into last changes Boaz Harrosh
2011-06-14 21:35   ` [PATCH 01/10] SQUASHME: pnfsd-exofs xdr_srv: Wrong type in comments Boaz Harrosh
2011-06-14 21:35   ` [PATCH 02/10] SQUASHME: pnfsd-exofs: Move all Server xdr definisions to separate header Boaz Harrosh
2011-06-14 21:36   ` [PATCH 03/10] SQUASHME: pnfsd-exofs: Prettify pnfs_osd_xdr_srv.h Boaz Harrosh
2011-06-14 21:36   ` [PATCH 04/10] SQUASHME: pnfsd-exofs: Change layout encoding to two pass Boaz Harrosh
2011-06-14 21:36   ` [PATCH 05/10] SQUASHME: pnfsd-exofs: osd_xdr_srv: Convert XDR API to return enum nfsstat4 Boaz Harrosh
2011-06-14 21:36   ` [PATCH 06/10] SQUASHME: pnfsd-exofs: Server xdr definisions were moved to a separate header Boaz Harrosh
2011-06-14 21:36   ` [PATCH 07/10] SQUASHME: pnfsd-exofs: osd_xdr_srv header moved Boaz Harrosh
2011-06-14 21:36   ` [PATCH 08/10] SQUASHME: pnfsd-exofs: layout encoding was Changed to two pass Boaz Harrosh
2011-06-14 21:36   ` [PATCH 09/10] SQUASHME: pnfsd-exofs: Convert XDR API to return enum nfsstat4 Boaz Harrosh
2011-06-14 21:38   ` [PATCH 10/10] SQUASHME: pnfsd-exofs: checkpatch love and a dprint Boaz Harrosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DF7D092.5020405@panasas.com \
    --to=bharrosh@panasas.com \
    --cc="Boaz Harrosh bharrosh"@panasas.com \
    --cc=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=osd-dev@open-osd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).