Damian Hazen wrote:
Hi -
I'm using XFS/DMAPI with a 2.6.10 kernel pulled from the CVS repository
a couple of days ago. I'm regularly getting an oops when calling
dm_set_disp() after receiving a mount event but before responding. This
has worked well for us in the past. Any insights into what's changed?
Thanks,
-Damian
Hi -
It looks like the vfs superblock structure is not being filled in
completely until after the mount event is responded to. If
dm_set_disp() is called before responding, it causes an oops in
dm_handle_to_ip() when it attempts to get the dentry here:
/* Now that the mutex is released, wait until we have access to the
inode.
*/
sb = fsrp->fr_sb;
if (fidp->fid_len == 0) { /* filesystem handle */
=> ip = sb->s_root->d_inode;
igrab(ip);
If you wait and call dm_set_disp() after responding, there's still a
race with linvfs_fill_super() to get s_root set. Would it be possible
to move up setting s_root to somewhere before dm_send_mount_event() is
called? It's nice to be able to set disposition and event lists before
turning the mount event loose to prevent anyone sneaking into the
filesystem before we're ready.
Thanks,
-Damian
|