linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET 0/2] Small change needed in nfs_xdr.h
@ 2011-06-13 20:53 Boaz Harrosh
  2011-06-13 20:54 ` [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4 Boaz Harrosh
  2011-06-13 20:56 ` [PATCH 2/2] exofs: pnfs-tree: Remove pnfs-osd private definitions Boaz Harrosh
  0 siblings, 2 replies; 4+ messages in thread
From: Boaz Harrosh @ 2011-06-13 20:53 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Benny Halevy, NFS list


Hi trond

I need this simple patch:

    [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4
    
    exofs file system wants to use pnfs_osd_xdr.h file instead of
    redefining pnfs-objects types in it's private "pnfs.h" header.
    
    Before we do the switch we must make sure pnfs_osd_xdr.h is
    compilable also under NFS versions smaller than 4.1. Since now
    it is needed regardless of version, by the exofs code.
    
    Only miss-out is nfs4_string move it to global scope.
    
    Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>

So I can submit this patch to the exofs tree:
    [PATCH 1/2] exofs: pnfs-tree: Remove pnfs-osd private definitions
    
    Now that pnfs-osd has hit mainline we can remove exofs's
    private header. (And the FIXME comment)
    
    Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>

The small problem is that if we both keep a copy of the patch in linux-next,
it will be fine until there are possibly more changes to nfs_xdr.h. git
merge will not like that.

If you have another batch for this -rc you could include the patch
and I'll rebase my linux-next on that -rc. Or we can risk having the same patch
and if there are any more changes just ping me and I'll see what I do with
linux-next. Or you can send me your ack-by: and I can submit it through
exofs tree.

Thanks
Boaz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4
  2011-06-13 20:53 [PATCHSET 0/2] Small change needed in nfs_xdr.h Boaz Harrosh
@ 2011-06-13 20:54 ` Boaz Harrosh
  2011-06-14 18:45   ` Trond Myklebust
  2011-06-13 20:56 ` [PATCH 2/2] exofs: pnfs-tree: Remove pnfs-osd private definitions Boaz Harrosh
  1 sibling, 1 reply; 4+ messages in thread
From: Boaz Harrosh @ 2011-06-13 20:54 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Benny Halevy, NFS list


exofs file system wants to use pnfs_osd_xdr.h file instead of
redefining pnfs-objects types in it's private "pnfs.h" headr.

Before we do the switch we must make sure pnfs_osd_xdr.h is
compilable also under NFS versions smaller than 4.1. Since now
it is needed regardless of version, by the exofs code.

Only miss-out is nfs4_string move it to global scope.

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

diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 0a21844..7372921 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -774,6 +774,11 @@ struct nfs3_getaclres {
 	struct posix_acl *	acl_default;
 };
 
+struct nfs4_string {
+	unsigned int len;
+	char *data;
+};
+
 #ifdef CONFIG_NFS_V4
 
 typedef u64 clientid4;
@@ -964,11 +969,6 @@ struct nfs4_server_caps_res {
 	struct nfs4_sequence_res	seq_res;
 };
 
-struct nfs4_string {
-	unsigned int len;
-	char *data;
-};
-
 #define NFS4_PATHNAME_MAXCOMPONENTS 512
 struct nfs4_pathname {
 	unsigned int ncomponents;
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] exofs: pnfs-tree: Remove pnfs-osd private definitions
  2011-06-13 20:53 [PATCHSET 0/2] Small change needed in nfs_xdr.h Boaz Harrosh
  2011-06-13 20:54 ` [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4 Boaz Harrosh
@ 2011-06-13 20:56 ` Boaz Harrosh
  1 sibling, 0 replies; 4+ messages in thread
From: Boaz Harrosh @ 2011-06-13 20:56 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Benny Halevy, NFS list


Now that pnfs-osd has hit mainline we can remove exofs's
private header. (And the FIXME comment)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 fs/exofs/exofs.h |    6 +-----
 fs/exofs/pnfs.h  |   45 ---------------------------------------------
 2 files changed, 1 insertions(+), 50 deletions(-)
 delete mode 100644 fs/exofs/pnfs.h

diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index c965806..e103dbd 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -36,13 +36,9 @@
 #include <linux/fs.h>
 #include <linux/time.h>
 #include <linux/backing-dev.h>
+#include <linux/pnfs_osd_xdr.h>
 #include "common.h"
 
-/* FIXME: Remove once pnfs hits mainline
- * #include <linux/exportfs/pnfs_osd_xdr.h>
- */
-#include "pnfs.h"
-
 #define EXOFS_ERR(fmt, a...) printk(KERN_ERR "exofs: " fmt, ##a)
 
 #ifdef CONFIG_EXOFS_DEBUG
diff --git a/fs/exofs/pnfs.h b/fs/exofs/pnfs.h
deleted file mode 100644
index c52e988..0000000
--- a/fs/exofs/pnfs.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2008, 2009
- * Boaz Harrosh <bharrosh@panasas.com>
- *
- * This file is part of exofs.
- *
- * exofs is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License  version 2 as published by the Free
- * Software Foundation.
- *
- */
-
-/* FIXME: Remove this file once pnfs hits mainline */
-
-#ifndef __EXOFS_PNFS_H__
-#define __EXOFS_PNFS_H__
-
-#if ! defined(__PNFS_OSD_XDR_H__)
-
-enum pnfs_iomode {
-	IOMODE_READ = 1,
-	IOMODE_RW = 2,
-	IOMODE_ANY = 3,
-};
-
-/* Layout Structure */
-enum pnfs_osd_raid_algorithm4 {
-	PNFS_OSD_RAID_0		= 1,
-	PNFS_OSD_RAID_4		= 2,
-	PNFS_OSD_RAID_5		= 3,
-	PNFS_OSD_RAID_PQ	= 4     /* Reed-Solomon P+Q */
-};
-
-struct pnfs_osd_data_map {
-	u32	odm_num_comps;
-	u64	odm_stripe_unit;
-	u32	odm_group_width;
-	u32	odm_group_depth;
-	u32	odm_mirror_cnt;
-	u32	odm_raid_algorithm;
-};
-
-#endif /* ! defined(__PNFS_OSD_XDR_H__) */
-
-#endif /* __EXOFS_PNFS_H__ */
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4
  2011-06-13 20:54 ` [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4 Boaz Harrosh
@ 2011-06-14 18:45   ` Trond Myklebust
  0 siblings, 0 replies; 4+ messages in thread
From: Trond Myklebust @ 2011-06-14 18:45 UTC (permalink / raw)
  To: Boaz Harrosh; +Cc: Benny Halevy, NFS list

On Mon, 2011-06-13 at 16:54 -0400, Boaz Harrosh wrote: 
> exofs file system wants to use pnfs_osd_xdr.h file instead of
> redefining pnfs-objects types in it's private "pnfs.h" headr.
> 
> Before we do the switch we must make sure pnfs_osd_xdr.h is
> compilable also under NFS versions smaller than 4.1. Since now
> it is needed regardless of version, by the exofs code.
> 
> Only miss-out is nfs4_string move it to global scope.
> 
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>

Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-14 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 20:53 [PATCHSET 0/2] Small change needed in nfs_xdr.h Boaz Harrosh
2011-06-13 20:54 ` [PATCH 1/2] nfs_xdr: Move nfs4_string definition out of #ifdef CONFIG_NFS_V4 Boaz Harrosh
2011-06-14 18:45   ` Trond Myklebust
2011-06-13 20:56 ` [PATCH 2/2] exofs: pnfs-tree: Remove pnfs-osd private definitions Boaz Harrosh

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).