Re: [PATCH 2/4] btrfs: convert enum btrfs_compression_type to define
From: David Sterba <hidden>
Date: 2017-08-17 11:58:31
From: David Sterba <hidden>
Date: 2017-08-17 11:58:31
On Thu, Aug 17, 2017 at 04:33:41AM +0800, Anand Jain wrote:
On 08/16/2017 09:59 PM, David Sterba wrote:quoted
On Sun, Aug 13, 2017 at 12:02:42PM +0800, Anand Jain wrote:quoted
There isn't a huge list to manage the types, which can be managed with defines. It helps to easily print the types in tracing as well.We use enums in a lot of places, I'd rather keep it as it is.This patch converts all of them, and it was at only one place.
Yeah, but I mean the enum vs define style of constant definition.
I hope I didn't miss any. Further the next patch 3/4 needs it to be define instead of enums, handling enums in the tracing isn't as easy as define.
Interesting, in what way are defines better use in tracepoints? I see eg. show_flush_state using enum btrfs_flush_state in btrfs_flush_space, the same pattern applies to patch 3/4.