My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 102 attachment: ohsm_k.h (2.6 KB)

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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Copyright (C) <2009>
*
* <Sandeep K Sinha>
* <Rishi B Agrawal> <Vineet Agarwal> <Rohit Vashist> <Rohit K Sharma> <Sneha Hendre>
*
* <sandeepksinha@gmail.com> <rishi.b.agrawal@gmail.com> <checkout.vineet@gmail.com>
* <rohit.k.vashist@gmail.com> <imreckless@gmail.com> <sneha.hendre@gmail.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version->
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE-> See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include<linux/module.h>
#include<linux/kernel.h>
#include<linux/types.h>

#define DEBUG /* if defined then debug on */

#ifdef DEBUG
#define ohsm_printk(x...) printk(KERN_DEBUG x)
#else
#define ohsm_printk(x...) do { } while(0)
#endif

#define OHSM_ADMIN_ERROR 1
#define OHSM_SET_POLICY 1
#define MAX_TIER 10
#define MAX_DISK 10
#define MAX_DISK_ALLOWED 11
#define MAX_MNT_LEN 20
#define map_info_ready_t unsigned char
#define table_ready_t unsigned char

char ohsm_mountpoint[MAX_MNT_LEN];
int ohsm_relocating = UNSET;
unsigned int Major;

map_info_ready_t mapper_flag = FALSE;
table_ready_t map_table_flag = FALSE;

struct ohsm_struct_rules *rules = NULL;
struct ext2_sb_info *ohsm_sbi = NULL;
struct ohsm_relocatable_inode *list_inodes = NULL;
struct ohsm_struct_for_ioctl *ohsm_admin_info = NULL;
struct ohsm_struct_rules *reloc_policy_t = NULL;
struct ohsm_device_info *devices;
struct ohsm_tier_dev_info *dev_info;
struct ohsm_reloc_policy *relocpol;
extern int ohsm_enabled;
extern unsigned long sam[MAX_TIER_ALLOWED][MAX_DISK_ALLOWED * 2 + 1];
extern struct ohsm_allocation_policy *alloc_policy;
extern struct super_block *ohsm_sb;
extern struct buffer_head *read_inode_bitmap (struct super_block *,unsigned long);
//extern int ohsm_set_dm_info_table(struct ohsm_disk_info **mapper_table);
void debug_print_sam(void);

int ohsm_sync_inode(struct inode *inode) {
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = 0,
};
return sync_inode(inode, &wbc);
}
unsigned char ohsm_get_tier (struct dentry *);
struct ohsm_allocation_policy *allocpol;
extern unsigned char (*ohsm_get_tier_fptr)(struct dentry *);
Powered by Google Project Hosting