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

Dean Roehrich
2006-08-04T14:12:13Z

On Fri, Aug 04, 2006 at 02:18:13PM +1000, Vlad Apostolov wrote:
> Hi Russel,
>
> I don't understand in details the build changes but they seam to be fine.

Vlad, why do they seem fine?

> In summary if the build system can find the DMAPI lib installed it will
> use hsmapi_noop.c otherwise hsmapi.c.
> The return code of HsmInitFileContext() stub probably should be non zero.
>
> It is looking good.

So this is determined at build time...so when you're using a version of
xfsdump/xfsrestore how do you know you're _not_ using one that is DMAPI-aware
_before_ you get into trouble with an invalid dump?

Assuming that issue is addressed, here's another: The libdm is a shared
object, so why not take advantage of that and load it with dlopen? Then the
issue is determined at runtime rather than build time. This is easy, and even
DMF does it this way.

Dean