Saturday, February 16, 2008

XFS/DMAPI Kernel RPM

Well I finally got an RPM build with LINUX 2.6.24-rc3. Now upgrades to the kernel in OSVault can be done much more easily (and safely). Still a lot of testing to run on it. The new kernel also includes a change for the DM_REMOVE_EVENT (deleting a file) that removes the migration database entry of files that are already migrated, then deleted. This keeps the database smaller and is generally better practice. IBM also put this same modification into their DMAPI kernel for the GPFS software.

The mod for the inodes goes in vfs_vnodeops.c like the following:
file_vp = XFS_ITOV(ip);

if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp,
DM_RIGHT_NULL, file_vp, DM_RIGHT_NULL,
name, NULL, dm_di_mode, 0, 0);
if (error)
return error;
}

This passes the inode to the dmapid program so that it doesn't have to thrash around trying to find out which file was deleted.