Commit 5e3c6c8b authored by Federico Vaga's avatar Federico Vaga

trigger: remove file operations from trigger

no existing trigger uses the file_operations, and the design
evolved towards a pipeline, where there always is a buffer
exchanging data with the trigger
Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent a17626ee
......@@ -79,19 +79,6 @@ trigger will push blocks to the buffer; for output it will release
the blocks. zio-core offers zio_generic_data_done() for triggers
that don't need special handling.
File Operations
===============
The trigger may include a non-NULL f_ops pointer. Most triggers will
not need it, but for example "app-request" does, because it needs to
look at individual read and write calls performed by applications.
ZIO will use these file operations (instead of the buffer file operations)
when the open method of the char device detects that the active trigger
declares a non-NULL f_ops field. These operations will most
likely fall back to buffer->f_ops for most of their actual work.
See zio-trig-app-request.c for details about how this is used.
When the trigger fires
======================
......
......@@ -17,7 +17,6 @@ struct zio_trigger_type {
/* file_operations because the trigger may override the buffer */
const struct zio_sysfs_operations *s_op;
const struct zio_trigger_operations *t_op;
const struct file_operations *f_op;
/* default attributes for instance */
struct zio_attribute_set zattr_set;
......@@ -45,8 +44,6 @@ struct zio_ti {
struct zio_ctrl_attr zattr_val;
const struct zio_trigger_operations *t_op;
const struct file_operations *f_op;
};
/* first 4bit are reserved for zio object universal flags */
......
......@@ -145,7 +145,6 @@ static struct zio_trigger_type zti_trigger = {
},
.s_op = &zti_s_ops,
.t_op = &zti_trigger_ops,
.f_op = NULL, /* we use buffer fops */
};
/*
......
......@@ -186,7 +186,6 @@ static struct zio_trigger_type ztt_trigger = {
},
.s_op = &ztt_s_ops,
.t_op = &ztt_trigger_ops,
.f_op = NULL, /* we use buffer fops */
};
/*
......
......@@ -1113,7 +1113,6 @@ static struct zio_ti *__ti_create_and_init(struct zio_trigger_type *trig,
}
/* Initialize trigger */
ti->t_op = trig->t_op;
ti->f_op = trig->f_op;
ti->flags |= cset->flags & ZIO_DIR;
ti->head.zobj_type = ZTI;
snprintf(ti->head.name, ZIO_NAME_LEN, "%s-%s-%d",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment