xfs
[Top] [All Lists]

Re: oops when calling dm_set_disp()

To: linux-xfs@xxxxxxxxxxx
Subject: Re: oops when calling dm_set_disp()
From: Damian Hazen <dhazen@xxxxxxx>
Date: Sat, 05 Mar 2005 19:05:27 -0800
In-reply-to: <4228077C.3070800@xxxxxxx>
References: <4228077C.3070800@xxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20050113 Red Hat/1.4.3-3.0.7.centos.1
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



<Prev in Thread] Current Thread [Next in Thread>