aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/pnfs.h
blob: 423033addd1fef0deb5fd7eb04339ecabc19ee2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * 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(CONFIG_PNFS)


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

#else /* defined(CONFIG_PNFS) */

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 /* else defined(CONFIG_PNFS) */

#endif /* __EXOFS_PNFS_H__ */