aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/eli/g_eli.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2005-08-13 17:45:37 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2005-08-13 17:45:37 +0000
commitbb30fea6679d89f8efa3026535f23cfdec8d3737 (patch)
tree7ff5d8bdaf868154e5a326005a47eaacc9119c16 /sys/geom/eli/g_eli.c
parent29f0e92957d52829605ab3b76eb359642a1ea6a4 (diff)
downloadsrc-bb30fea6679d89f8efa3026535f23cfdec8d3737.tar.gz
src-bb30fea6679d89f8efa3026535f23cfdec8d3737.zip
Because code paths for I/O requests are quite complex, add comments above
the functions which participate in I/O paths. MFC after: 1 day
Notes
Notes: svn path=/head/; revision=149030
Diffstat (limited to 'sys/geom/eli/g_eli.c')
-rw-r--r--sys/geom/eli/g_eli.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index e0bf1d181e58..f57aa380e2d1 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -135,6 +135,8 @@ g_eli_crypto_rerun(struct cryptop *crp)
/*
* The function is called afer reading encrypted data from the provider.
+ *
+ * g_eli_start -> g_io_request -> G_ELI_READ_DONE -> g_eli_crypto_run -> g_eli_crypto_read_done -> g_io_deliver
*/
static void
g_eli_read_done(struct bio *bp)
@@ -181,6 +183,8 @@ g_eli_read_done(struct bio *bp)
/*
* The function is called after we read and decrypt data.
+ *
+ * g_eli_start -> g_io_request -> g_eli_read_done -> g_eli_crypto_run -> G_ELI_CRYPTO_READ_DONE -> g_io_deliver
*/
static int
g_eli_crypto_read_done(struct cryptop *crp)
@@ -224,6 +228,8 @@ g_eli_crypto_read_done(struct cryptop *crp)
/*
* The function is called after we encrypt and write data.
+ *
+ * g_eli_start -> g_eli_crypto_run -> g_eli_crypto_write_done -> g_io_request -> G_ELI_WRITE_DONE -> g_io_deliver
*/
static void
g_eli_write_done(struct bio *bp)
@@ -252,6 +258,8 @@ g_eli_write_done(struct bio *bp)
/*
* The function is called after data encryption.
+ *
+ * g_eli_start -> g_eli_crypto_run -> G_ELI_CRYPTO_WRITE_DONE -> g_io_request -> g_eli_write_done -> g_io_deliver
*/
static int
g_eli_crypto_write_done(struct cryptop *crp)
@@ -329,6 +337,10 @@ g_eli_orphan(struct g_consumer *cp)
g_eli_destroy(sc, 1);
}
+/*
+ * BIO_READ : G_ELI_START -> g_io_request -> g_eli_read_done -> g_eli_crypto_run -> g_eli_crypto_read_done -> g_io_deliver
+ * BIO_WRITE: G_ELI_START -> g_eli_crypto_run -> g_eli_crypto_write_done -> g_io_request -> g_eli_write_done -> g_io_deliver
+ */
static void
g_eli_start(struct bio *bp)
{