Re: review: Simple patch to remove the dmapi support from xfsdump

Bill Kendall
2006-08-07T19:15:09Z

On 08/07/06 11:51, Dean Roehrich wrote:
> On Mon, Aug 07, 2006 at 08:52:48AM -0700, Chris Wedgwood wrote:
>> On Mon, Aug 07, 2006 at 10:30:15AM -0500, Russell Cattelan wrote:
>>
>>> It seems rather dangerous to have a #define floating around that
>>> could potentially get out of sync with the original, especially if
>>> you transport the number and not the enum table. (It make it really
>>> hard for cscope to find :-)
>> If it saves a header I don't see any harm in the original approach
>> with a comment preceding it explain what the bits are and why not to
>> screw them up.
>
> I agree with Russell that you want cscope to tell you about every place those
> bits are being used, so you want those defines or at least those symbols to
> show up here. Having them in a comment won't help cscope.
>
> Dean

I'll put these defines in hsmapi.c, and revert DMF_EV_BITS back to using
these symbols:

/* DM_EVENT_* are defined in <xfs/dmapi.h>. Trying to avoid a dmapi dependency
* in xfsdump since dmapi is not commonly used, yet this code needs to know some
* of the event bits.
*/
#define DM_EVENT_READ 16
#define DM_EVENT_WRITE 17
#define DM_EVENT_TRUNCATE 18
#define DM_EVENT_DESTROY 20

Bill