summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_slice.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-04-19 10:14:39 +0000
committerphk <phk@FreeBSD.org>2003-04-19 10:14:39 +0000
commitdb4d21ffafbbfa6ff68e411a61e5cf3b8bcd7890 (patch)
treec6feefe6bcb5bc356c584e3472cc6fc8e2660afa /sys/geom/geom_slice.h
parenta41f716e9125fc28668d9e5527484d806592cddf (diff)
downloadFreeBSD-src-db4d21ffafbbfa6ff68e411a61e5cf3b8bcd7890.zip
FreeBSD-src-db4d21ffafbbfa6ff68e411a61e5cf3b8bcd7890.tar.gz
Make more of the "hotspot" stuff generic:
Give the class a way to specify the necessary action for read/delete/write: ALLOW, DENY, START or CALL. Update geom_bsd to use this.
Diffstat (limited to 'sys/geom/geom_slice.h')
-rw-r--r--sys/geom/geom_slice.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/geom/geom_slice.h b/sys/geom/geom_slice.h
index ff66d7e..4460c28 100644
--- a/sys/geom/geom_slice.h
+++ b/sys/geom/geom_slice.h
@@ -48,6 +48,9 @@ struct g_slice {
struct g_slice_hot {
off_t offset;
off_t length;
+ int ract;
+ int dact;
+ int wact;
};
typedef int g_slice_start_t (struct bio *bp);
@@ -56,10 +59,13 @@ struct g_slicer {
u_int nslice;
u_int nprovider;
struct g_slice *slices;
+
u_int nhotspot;
struct g_slice_hot *hotspot;
+
void *softc;
g_slice_start_t *start;
+ g_call_me_t *hot;
};
g_dumpconf_t g_slice_dumpconf;
@@ -69,7 +75,12 @@ int g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t le
#define G_SLICE_CONFIG_FORCE 2
struct g_geom * g_slice_new(struct g_class *mp, u_int slices, struct g_provider *pp, struct g_consumer **cpp, void *extrap, int extra, g_slice_start_t *start);
-int g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length);
+int g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length, int ract, int dact, int wact);
+#define G_SLICE_HOT_ALLOW 1
+#define G_SLICE_HOT_DENY 2
+#define G_SLICE_HOT_START 4
+#define G_SLICE_HOT_CALL 8
+
void g_slice_finish_hot(struct bio *bp);
#endif /* _GEOM_GEOM_SLICE_H_ */
OpenPOWER on IntegriCloud