mirror of
https://github.com/torvalds/linux.git
synced 2024-12-20 18:11:47 +00:00
89be503021
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>
46 lines
925 B
C
46 lines
925 B
C
/*
|
|
* 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__ */
|