.gitignore: ignore also TAGS files

TAGS files are typically generated by etags and ctags. Their aim is to
indexing files content

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Makefile: compile tools outside kbuild environment

Because their are not part of the module building but simple user space
application. To avoid confusion, do not use kbuild environment style

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Makefile: use src instead of obj variable

src point to the source code. Obj point to the object. Sometimes they
live toghether but users can decide to build the object outside the
source tree.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
tools: fix printf format warning 32/64bits

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
trivial: zio-sysfs.h spacing fix

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
chardev: fix gcc warning on devnode prototype

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by:  Alessandro Rubini <rubini@gnudd.com>
core [bugfix]: on output fail, remove block

The trigger-user fires _only_ on ti->push(), and buffers try to
push blocks _only_ if there are no enqueued blocks.

When using the trigger-user on the output flow and the correspondent
cset->raw_io() operation fails, then the pushing does not succed and
buffers start to enqueue the incoming blocks instead of pushing them
to the trigger.

This patch frees all active_blocks if cset->raw_io() fails (like we
did for the input flow), and it raise the trigger lost alarm.

The patch also raise the trigger lost alarm on the input flow and
clears the active_block

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
zio_arm_trigger: on arm fail clear active_block

This patch moves the active_block clean up code into the generic
zio_arm_trigger() function. Every time an arm fails, we clear all
active_block.

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
zio-user.h: new alarm flag

ZIO_ALARM_LOST_SNIFF is going to be used by the sniff device,
to mark that this sniffing stream has lost at least one control

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
new feature: a "sniff" device receiving all control structures

/dev/zio-sniff.ctrl is a misc device, selected by CONFIG_ZIO_SNIFF_DEV
which currently is on by default.  Every time a block is released,
a copy of the control is delivered to every reader of the device.

This is meant to be useful for monitoring, and to retrieve the
perfomance figures that will be added by later commits.  We need
a sniff device to monitor output channels, because even the application
driving I/O cannot recover the control structures that leave the
ZIO pipeline.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
tools/zio-dump: add sniff mode

Add "-s", so the dumper knows the file argument is a sequence
of control structures, with no data intermixed.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
header: move all user define to zio-user.h

Thanks to this patch all user-space applications depends only on the
zio-user.h header

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
drivers: use CERN_SUPER_MODULE trick

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>