dm_handle_to_path() will now work in most cases, and in the other cases
there's just a little more grunt work that has to be done in the library. If
the directory that contains some component of the path has never had a lookup
performed on it, then the kernel won't have that dir in its dcache. In that
case it'll create an anonymous dentry for the filesystem's root dir, and the
library detects that this happened.
If the library detects that an anonymous dentry was created, then it returns
an error indicating that it didn't find the path. Before I take this another
step, I'd like to know if this scenario happens in actual practice. I'm
betting the directory of interest has almost always been loaded into the
dcache by a user process before the HSM uses dm_handle_to_path(). We'll see.
It seems that ioctl(XFS_IOC_OPEN_BY_HANDLE) would have the same restriction,
though it looks like it's never used in a case where the path hasn't already
been accessed.
This mod also removes libdm's dependence on libhandle.
Date: Thu Mar 21 09:33:31 PST 2002
Workarea: clink-eth.americas.sgi.com:/data/clink/a67/roehrich/2.4.x-xfs
The following file(s) were checked into:
bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs
Modid: xfs-cmds:slinx:114629a
cmd/dmapi/configure.in - 1.13
- Remove check for libhandle.
cmd/dmapi/VERSION - 1.10
- update revision
cmd/dmapi/man/man3/dmapi.3 - 1.3
- Update, libhandle no longer required.
cmd/dmapi/include/dmapi_kern.h - 1.3
- sync with kernel side
cmd/dmapi/include/dmapi.h - 1.4
- sync with kernel side
cmd/dmapi/debian/changelog - 1.9
- update
cmd/dmapi/libdm/dm_handle2path.c - 1.7
- Use new DM_OPEN_BY_HANDLE call. Verify its results.
cmd/dmapi/libdm/dm_handle.c - 1.4
- cleanup junk
cmd/dmapi/libdm/dmapi_lib.c - 1.7
- Add DM_OPEN_BY_HANDLE case.
cmd/dmapi/libdm/Makefile - 1.7
- Do not look for libhandle.
|