xfs
[Top] [All Lists]

Re: XFS dmapi: dm_path_to_handle fails if the path is a directory

To: Vlad Apostolov <vapo@xxxxxxx>
Subject: Re: XFS dmapi: dm_path_to_handle fails if the path is a directory
From: John Groves <John@xxxxxxxxxx>
Date: Thu, 02 Nov 2006 20:53:37 -0600
Cc: jgl@xxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx, Dean Roehrich <roehrich@xxxxxxx>
In-reply-to: <454AAC6B.7010406@xxxxxxx>
References: <4547DA70.4040107@xxxxxxxxxx> <4547EDFD.8020407@xxxxxxx> <454A94A6.6040907@xxxxxxxxxxxxxx> <454AAC6B.7010406@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
Vlad Apostolov wrote:

Hi John,

I did try this on my dmapi filesystem:

emu:/mnt/scratch1/dmapi_test # mkdir -p x/y/z
emu:/mnt/scratch1/dmapi_test # /home/vapo/isms/xfs-cmds/xfstests/dmapi/src/suite1/cmd/path_to_handle x/y
5d1111a90e4800000e00000003000000d903400000000000
emu:/mnt/scratch1/dmapi_test # mv x/y x/w
emu:/mnt/scratch1/dmapi_test # /home/vapo/isms/xfs-cmds/xfstests/dmapi/src/suite1/cmd/path_to_handle x/w
5d1111a90e4800000e00000003000000d903400000000000
emu:/mnt/scratch1/dmapi_test #

I also tried path_to_handle with relative path to a directory it worked fine too. When you say
dm_path_to_handle fails, what is the error returned?

Regards,
Vlad


Vlad,

This was my bad -- I need to go back to programming school ;-).

The function in question was dealing in mount-point-relative paths, not full paths, and I didn't notice the distinction. Passing a full path to dm_path_to_handle fixed it. As for thinking it behaved differently for a directory than for a file -- I've been smoking a batch of bad crack ;-). Calling dm_path_to_handle also failed with relative paths to files -- I just didn't notice because it wasn't fatal on that code path.

Thanks for responding and looking into it, though.

Regards,
John



<Prev in Thread] Current Thread [Next in Thread>