We have developed a stackable filesystem kernel module for a HSM
application. The role of the filter module is to intercept operations
between VFS and file system. It then sends events to userspace when these
are invoked. We are using ext3 or reiserfs for bottom file system and are
evaluating XFS, since it provides all required functionality (extended
attributes, journals).
In some cases the filter module has to call iget instead of lookup, since it
doesn't have the full pathname of the file but just its inode number (ino).
On XFS this only works when the inode is found in the cache. If it has to be
loaded from disk it oops-es. This is because iget calls read_inode which is
not implemented in XFS and just jumps to nowhere.
We are considering to call xfs_iget instead of iget, but are not aware of
all functional implications this might have. Could someone explain if this
is the correct sequence to be called and why not:
struct super_block *sb;
struct inode *inode;
vfs_t *vfsp = LINVFS_GET_VFS(sb);
xfs_mount_t *mp = XFS_BHVTOM(vfsp->vfs_fbhv);
xfs_inode_t *ip = NULL;
int error = xfs_iget(mp, NULL, ino, XFS_ILOCK_SHARED, &ip, 0);
vnode_t *vpp = XFS_ITOV(ip);
inode = LINVFS_GET_IP(vpp);
/* access inode, e.g. read extended attributes */
xfs_iunlock(ip, XFS_ILOCK_SHARED);
Any other ideas/suggestion? Thanks in advance for your answer.
Tomaz
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
|