From: Geneviève Bastien Date: Tue, 11 Feb 2020 16:20:27 +0000 (-0500) Subject: block: Make the rwbs field as a bit field enum X-Git-Tag: before-upstreaming~37 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=23634515e7271c8c8594ad87a6685232d4eff297;hp=23634515e7271c8c8594ad87a6685232d4eff297;p=lttng-modules.git 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 Signed-off-by: Mathieu Desnoyers ---