forked from portworx/px-fuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pxd_fastpath_stub.h
95 lines (82 loc) · 2.13 KB
/
pxd_fastpath_stub.h
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#ifndef _PX_FASTPATH_STUB_
#define _PX_FASTPATH_STUB_
#include <linux/kernel.h>
#include <asm/bug.h>
struct pxd_device;
struct pxd_update_path_out;
/// module global fastpath specific setup/cleanup
static inline
int fastpath_init(void) { return 0; }
static inline
void fastpath_cleanup(void) {}
static inline
struct workqueue_struct* fastpath_workqueue(void)
{
BUG_ON(!"unexpected");
return NULL;
}
/// common failover/fallback code path
static inline
int pxd_request_suspend_internal(struct pxd_device *pxd_dev, bool skip_flush, bool coe)
{
BUG_ON(!"unexpected");
return -EINVAL;
}
static inline
int pxd_request_resume_internal(struct pxd_device *pxd_dev)
{
BUG_ON(!"unexpected");
return -EINVAL;
}
/// ioctl calls from userspace
static inline
int pxd_request_suspend(struct pxd_device *pxd_dev, bool skip_flush, bool coe)
{
BUG_ON(!"unexpected");
return -EINVAL;
}
static inline
int pxd_request_resume(struct pxd_device *pxd_dev)
{
BUG_ON(!"unexpected");
return -EINVAL;
}
static inline
int pxd_request_ioswitch(struct pxd_device *pxd_dev, int code)
{
BUG_ON(!"unexpected");
return -EINVAL;
}
/// node wipe callback
static inline
int pxd_fastpath_vol_cleanup(struct pxd_device *pxd_dev)
{
return 0;
}
// restart code path
static inline
void pxd_abortfailQ(struct pxd_device *pxd_dev) {}
static inline
void pxd_reissuefailQ(struct pxd_device *pxd_dev, struct list_head *ios, int status) {}
static inline
void disableFastPath(struct pxd_device *pxd_dev, bool skipSync) {}
// common volume attach/detach path
static inline
int pxd_fastpath_init(struct pxd_device *pxd_dev) { return 0; }
static inline
void pxd_fastpath_cleanup(struct pxd_device *pxd_dev) {}
/// per volume fastpath specific init
static inline
int pxd_init_fastpath_target(struct pxd_device *pxd_dev, struct pxd_update_path_out *update_path)
{
BUG_ON(!"unexpected");
return -EINVAL;
}
/// debug routines
static inline
int pxd_debug_switch_fastpath(struct pxd_device *pxd_dev) { return 0; }
static inline
int pxd_debug_switch_nativepath(struct pxd_device *pxd_dev) { return 0; }
static inline
int pxd_suspend_state(struct pxd_device *pxd_dev) { return 0; }
#endif /* _PX_FASTPATH_STUB_ */