block: Make the rwbs field as a bit field enum
The rwbs value of block request events is in fact a series of bit fields
set to 0 or 1. The enumeration values are all powers of 2, trace readers
could interpret this as a bit field enum and show the result as a
concatenation of the corresponding flags. For example, with a matching
patch for babeltrace2's pretty sink, the output for a rwbs value of 12
would be:
[13:15:49.
024354958] (+0.
000003868) wilbrod block_rq_complete: { cpu_id = 4 },
{ dev =
8388624, sector =
375490176, nr_sector = 360, error = 0,
rwbs = ( "RWBS_FLAG_READ" | "RWBS_FLAG_RAHEAD" : container = 12 ) }
Consumers who have no notion of the bit field enum can still use the
integer value of the field as before.
Change-Id: I2e873f16e5a0507e52cfc85c70b471a9f4d5d5d1
Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>