| To: | John Groves <John@xxxxxxxxxx> |
|---|---|
| Subject: | Re: XFS dmapi: dm_path_to_handle fails if the path is a directory |
| From: | Vlad Apostolov <vapo@xxxxxxx> |
| Date: | Wed, 01 Nov 2006 11:57:32 +1100 |
| Cc: | Vlad Apostolov <vapo@xxxxxxx>, linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <4547EDFD.8020407@sgi.com> |
| References: | <4547DA70.4040107@Groves.net> <4547EDFD.8020407@sgi.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Thunderbird 1.5.0.7 (X11/20060909) |
Vlad Apostolov wrote:
John Groves wrote:I'm running up against a difficult situation because dm_path_to_handle does not return a handle, if the path is to a directory. Is this a known issue, or perhaps fixed in a recent version? Or is there another way get the handle of a directory by path? When any file type is renamed, I (for various reasons) *must* know not just the old & new parent handles, but also the handle of the renamed thingy. If the thingy is a directory, I'm stuck at the moment. You could also see an example of how to use dm_path_to_handle() in xfs-cmds/xfstests/dmapi/src/suite1/cmd/path_to_handle.c Here is the output for a regular file and a directory: vapo@emu ~/isms/xfs-cmds/xfstests/dmapi/src/suite1/cmd> ls -al /mnt/scratch1 total 8 drwxrwxrwx 4 root root 46 2006-11-01 12:04 . drwxr-xr-x 8 root root 89 2006-10-30 14:23 .. drwxr-xr-x 7 root root 4096 2006-10-26 10:56 dmapi drwxr-xr-x 8 root root 4096 2006-10-26 10:56 dmapi_test -rw-r--r-- 1 vapo cdrom 0 2006-11-01 12:04 file vapo@emu ~/isms/xfs-cmds/xfstests/dmapi/src/suite1/cmd> sudo ./path_to_handle /mnt/scratch1/file 5d1111a90e4800000e000000710100009600000000000000 vapo@emu ~/isms/xfs-cmds/xfstests/dmapi/src/suite1/cmd> sudo ./path_to_handle /mnt/scratch1/dmapi 5d1111a90e4800000e0000006e0000008300000000000000 vapo@emu ~/isms/xfs-cmds/xfstests/dmapi/src/suite1/cmd> Regards, Vlad |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: XFS dmapi: dm_path_to_handle fails if the path is a directory, Vlad Apostolov |
|---|---|
| Next by Date: | zip code 10022, promotions |
| Previous by Thread: | Re: XFS dmapi: dm_path_to_handle fails if the path is a directory, Vlad Apostolov |
| Next by Thread: | zip code 10022, promotions |
| Indexes: | [Date] [Thread] [Top] [All Lists] |