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
|