0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef FILECHECK_H
0012 #define FILECHECK_H
0013
0014 #include <linux/types.h>
0015 #include <linux/list.h>
0016
0017
0018
0019 enum {
0020 OCFS2_FILECHECK_ERR_SUCCESS = 0,
0021 OCFS2_FILECHECK_ERR_FAILED = 1000,
0022 OCFS2_FILECHECK_ERR_INPROGRESS,
0023 OCFS2_FILECHECK_ERR_READONLY,
0024 OCFS2_FILECHECK_ERR_INJBD,
0025 OCFS2_FILECHECK_ERR_INVALIDINO,
0026 OCFS2_FILECHECK_ERR_BLOCKECC,
0027 OCFS2_FILECHECK_ERR_BLOCKNO,
0028 OCFS2_FILECHECK_ERR_VALIDFLAG,
0029 OCFS2_FILECHECK_ERR_GENERATION,
0030 OCFS2_FILECHECK_ERR_UNSUPPORTED
0031 };
0032
0033 #define OCFS2_FILECHECK_ERR_START OCFS2_FILECHECK_ERR_FAILED
0034 #define OCFS2_FILECHECK_ERR_END OCFS2_FILECHECK_ERR_UNSUPPORTED
0035
0036 struct ocfs2_filecheck {
0037 struct list_head fc_head;
0038 spinlock_t fc_lock;
0039 unsigned int fc_max;
0040 unsigned int fc_size;
0041 unsigned int fc_done;
0042 };
0043
0044 #define OCFS2_FILECHECK_MAXSIZE 100
0045 #define OCFS2_FILECHECK_MINSIZE 10
0046
0047
0048 enum {
0049 OCFS2_FILECHECK_TYPE_CHK = 0,
0050 OCFS2_FILECHECK_TYPE_FIX,
0051 OCFS2_FILECHECK_TYPE_SET = 100
0052 };
0053
0054 struct ocfs2_filecheck_sysfs_entry {
0055 struct kobject fs_kobj;
0056 struct completion fs_kobj_unregister;
0057 struct ocfs2_filecheck *fs_fcheck;
0058 };
0059
0060
0061 int ocfs2_filecheck_create_sysfs(struct ocfs2_super *osb);
0062 void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb);
0063
0064 #endif