1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef FILECHECK_H
14 #define FILECHECK_H
15
16 #include <linux/types.h>
17 #include <linux/list.h>
18
19
20
21 enum {
22 OCFS2_FILECHECK_ERR_SUCCESS = 0,
23 OCFS2_FILECHECK_ERR_FAILED = 1000,
24 OCFS2_FILECHECK_ERR_INPROGRESS,
25 OCFS2_FILECHECK_ERR_READONLY,
26 OCFS2_FILECHECK_ERR_INJBD,
27 OCFS2_FILECHECK_ERR_INVALIDINO,
28 OCFS2_FILECHECK_ERR_BLOCKECC,
29 OCFS2_FILECHECK_ERR_BLOCKNO,
30 OCFS2_FILECHECK_ERR_VALIDFLAG,
31 OCFS2_FILECHECK_ERR_GENERATION,
32 OCFS2_FILECHECK_ERR_UNSUPPORTED
33 };
34
35 #define OCFS2_FILECHECK_ERR_START OCFS2_FILECHECK_ERR_FAILED
36 #define OCFS2_FILECHECK_ERR_END OCFS2_FILECHECK_ERR_UNSUPPORTED
37
38 struct ocfs2_filecheck {
39 struct list_head fc_head;
40 spinlock_t fc_lock;
41 unsigned int fc_max;
42 unsigned int fc_size;
43 unsigned int fc_done;
44 };
45
46 #define OCFS2_FILECHECK_MAXSIZE 100
47 #define OCFS2_FILECHECK_MINSIZE 10
48
49
50 enum {
51 OCFS2_FILECHECK_TYPE_CHK = 0,
52 OCFS2_FILECHECK_TYPE_FIX,
53 OCFS2_FILECHECK_TYPE_SET = 100
54 };
55
56 struct ocfs2_filecheck_sysfs_entry {
57 struct kobject fs_kobj;
58 struct completion fs_kobj_unregister;
59 struct ocfs2_filecheck *fs_fcheck;
60 };
61
62
63 int ocfs2_filecheck_create_sysfs(struct ocfs2_super *osb);
64 void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb);
65
66 #endif