Skip to content

Commit

Permalink
exofs: fix pnfs_osd re-definitions in pre-pnfs trees
Browse files Browse the repository at this point in the history
Some on disk exofs constants and types are defined in the pnfs_osd_xdr.h
file. Since we needed these types before the pnfs-objects code was
accepted to mainline we duplicated the minimal needed definitions into
an exofs local header. The definitions where conditionally included
depending on !CONFIG_PNFS defined. So if PNFS was present in the tree
definitions are taken from there and if not they are defined locally.

That was all good but, the CONFIG_PNFS is planed to be included upstream
before the pnfs-objects is also included. (The first pnfs batch might be
pnfs-files only)

So condition exofs local definitions on the absence of pnfs_osd_xdr.h
inclusion (__PNFS_OSD_XDR_H__ not defined). User code must make sure
that in future pnfs_osd_xdr.h will be included before fs/exofs/pnfs.h,
which happens to be so in current code.

Once pnfs-objects hits mainline, exofs's local header will be removed.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed Jan 5, 2010
1 parent c5974b8 commit 89be503
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions fs/exofs/pnfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
#ifndef __EXOFS_PNFS_H__
#define __EXOFS_PNFS_H__

#if defined(CONFIG_PNFS)


/* FIXME: move this file to: linux/exportfs/pnfs_osd_xdr.h */
#include "../nfs/objlayout/pnfs_osd_xdr.h"

#else /* defined(CONFIG_PNFS) */
#if ! defined(__PNFS_OSD_XDR_H__)

enum pnfs_iomode {
IOMODE_READ = 1,
Expand All @@ -46,6 +40,6 @@ struct pnfs_osd_data_map {
u32 odm_raid_algorithm;
};

#endif /* else defined(CONFIG_PNFS) */
#endif /* ! defined(__PNFS_OSD_XDR_H__) */

#endif /* __EXOFS_PNFS_H__ */

0 comments on commit 89be503

Please sign in to comment.