[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dm_handle_to_path




>From:  "James A Goodwin" <jagoodwi@us.ibm.com>
>Dean,
>
>I've found another one.
>
>The dm_handle_to_path() call gives an EBADF any time you supply the same
>directory handle for both the directory and target arguments.  I've looked
>at the libdm code and the introductory comments indicate that this specific
>situation was foreseen and specifically designed to work.
>
>I'm making the call just after receiving a remove event.  I'm trying to
>convert the file handle for the parent directory of the object into a
>pathname.  I can then append the name of the file to the returned directory
>path for use in a dm_path_to_handle() call to get the handle for the
>object.

Sure, here's an old note I have on that.

I'm still amazed that handle_to_path exists.  Should never have been in the
spec, if you ask me :)

What are you going to do when someone mounts the filesystem on multiple mount
points?  Or does a bind mount?  Are you trying to keep track of the path, or
are you just using it temporarily?

Dean

-----------

>
>Subject: RE: using dmapi to sync filesystems (was using xfsdump...) 
>From:    Matthijs van der Klip <matthijs.van.der.klip@nos.nl>
>Date:    Thu, 13 Dec 2001 17:08:44 +0100
>To:      "'Dean Roehrich'" <roehrich@sgi.com>
>From matthijs.van.der.klip@nos.nl  Thu Dec 13 10: 06:11 2001
>
>This message is in MIME format. Since your mail reader does not understand
>this format, some or all of this message may not be legible.
>
>------_=_NextPart_001_01C183F0.71F8D1AA
>Content-Type: text/plain;
>        charset="iso-8859-1"
>
>>I'll take a look at it.
>
>I just took a look for myself and it looks like all this is
>unimplemented:
>
>from dm_handle_to_path:
>
>        if (dm_handle_to_ino(targhanp, targhlen, &ino))
>                return -1;      /* leave errno set from dm_handle_to_ino */
>
>from dm_handle_to_ino:
>
>        if (parse_handle(hanp, hlen, NULL, inop, NULL) == DM_HANDLE_FILE)
>                return(0);
>        errno = EBADF;
>        return(-1);
>
>
>Function dm_handle_to_path uses function dm_handle_to_ino which always
>returns a 'bad file descriptor' error.
>
>
>Best regards,
>
>Matthijs van der Klip
>
>