看板 DFBSD_bugs 關於我們 聯絡資訊
--Apple-Mail-1--292580815 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Feb 9, 2010, at 6:21 PM, Matthew Dillon wrote: > > :I had a ntfs read-only mount and copied a few files off of it. > After that I > :tried unmounting it, which resulted in the panic mentioned in the > subject. The > :core is available at leaf:~rumko/crash/vnode/*.6 and the kernel was > from about > :31st Jan. > > Ok, try this patch. It looks like NTFS accesses auxillary vnodes > while flushing other vnodes, so a single vflush scan won't catch > them > all. I don't even know if multiple vflushes will catch them all > but lets try it and find out. > > -Matt > > diff --git a/sys/vfs/ntfs/ntfs_vfsops.c b/sys/vfs/ntfs/ntfs_vfsops.c > index d3d80d2..2a8c1a5 100644 > --- a/sys/vfs/ntfs/ntfs_vfsops.c > +++ b/sys/vfs/ntfs/ntfs_vfsops.c > @@ -633,6 +633,8 @@ ntfs_unmount(struct mount *mp, int mntflags) > > dprintf(("ntfs_unmount: vflushing...\n")); > error = vflush(mp, 0, flags | SKIPSYSTEM); > + error = vflush(mp, 0, flags | SKIPSYSTEM); > + error = vflush(mp, 0, flags | SKIPSYSTEM); > if (error) { > kprintf("ntfs_unmount: vflush failed: %d\n",error); > return (error); > @@ -649,6 +651,8 @@ ntfs_unmount(struct mount *mp, int mntflags) > > /* vflush system vnodes */ > error = vflush(mp, 0, flags); > + error = vflush(mp, 0, flags); > + error = vflush(mp, 0, flags); > if (error) > kprintf("ntfs_unmount: vflush failed(sysnodes): %d\n",error); > Hi, I tried your patch, but it didn't solve the problem. I'm using a x86_64 kernel from Jan 30th on xen. (gdb) bt #0 Debugger (msg=<value optimized out>) at /usr/src/sys/platform/pc64/x86_64/db_interface.c:360 #1 0xffffffff8036aa0d in panic (fmt=0xffffffff8064bb8e "unmount: dangling vnode") at /usr/src/sys/kern/kern_shutdown.c:742 #2 0xffffffff803d3762 in dounmount (mp=0xffffffff91f64260, flags=0) at /usr/src/sys/kern/vfs_syscalls.c:783 #3 0xffffffff803d38d0 in sys_unmount (uap=0xffffffffb2f07b48) at /usr/src/sys/kern/vfs_syscalls.c:618 #4 0xffffffff805c40fa in syscall2 (frame=0xffffffffb2f07bf8) at /usr/src/sys/platform/pc64/x86_64/trap.c:1189 #5 0xffffffff805bcce3 in Xfast_syscall () at /usr/src/sys/platform/pc64/x86_64/exception.S:304 #6 0x00007ffffffffa8f in ?? () Reply contains invalid hex digit 84 Here's the info I have regarding the ntfs partition I'm testing with: vm11 /usr/src/sys/vfs/ntfs/ $ df | grep ad2 /dev/ad2 51200 6196 45004 12% /mnt vm1 /usr/src/sys/vfs/ntfs/ $ mount | grep ad2 /dev/ad2 on /mnt (ntfs, local) vm1 /usr/src/sys/vfs/ntfs/ $ du /mnt/ 0 /mnt/$Extend 352 /mnt/boot/common 16 /mnt/boot/ficl/i386 16 /mnt/boot/ficl/ia64 81 /mnt/boot/ficl/softwords 16 /mnt/boot/ficl/sparc64 545 /mnt/boot/ficl 112 /mnt/boot/forth 1025 /mnt/boot 3221 /mnt/ Tim --Apple-Mail-1--292580815 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space; "><br><div><div>On Feb 9, 2010, = at 6:21 PM, Matthew Dillon wrote:</div><br = class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div><br>:I = had a ntfs read-only mount and copied a few files off of it. After that = I<br>:tried unmounting it, which resulted in the panic mentioned in the = subject. The<br>:core is available at leaf:~rumko/crash/vnode/*.6 and = the kernel was from about<br>:31st Jan.<br><br> &nbsp;&nbsp;&nbsp;Ok, = try this patch. &nbsp;It looks like NTFS accesses auxillary vnodes<br> = &nbsp;&nbsp;&nbsp;while flushing other vnodes, so a single vflush scan = won't catch them<br> &nbsp;&nbsp;&nbsp;all. &nbsp;I don't even know if = multiple vflushes will catch them all<br> &nbsp;&nbsp;&nbsp;but lets try = it and find out.<br><br><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>-Matt<br><br>diff --git = a/sys/vfs/ntfs/ntfs_vfsops.c b/sys/vfs/ntfs/ntfs_vfsops.c<br>index = d3d80d2..2a8c1a5 100644<br>--- a/sys/vfs/ntfs/ntfs_vfsops.c<br>+++ = b/sys/vfs/ntfs/ntfs_vfsops.c<br>@@ -633,6 +633,8 @@ ntfs_unmount(struct = mount *mp, int mntflags)<br><br> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>dprintf(("ntfs_unmount: = vflushing...\n"));<br> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>error =3D vflush(mp, 0, flags | = SKIPSYSTEM);<br>+<span class=3D"Apple-tab-span" style=3D"white-space:pre">= </span>error =3D vflush(mp, 0, flags | SKIPSYSTEM);<br>+<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>error =3D = vflush(mp, 0, flags | SKIPSYSTEM);<br> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>if (error) {<br> <span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>kprintf("ntfs_unmount: vflush failed: %d\n",error);<br> <span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>return = (error);<br>@@ -649,6 +651,8 @@ ntfs_unmount(struct mount *mp, int = mntflags)<br><br> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>/* vflush system vnodes */<br> = <span class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>error =3D vflush(mp, 0, flags);<br>+<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>error =3D vflush(mp, 0, = flags);<br>+<span class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>error =3D vflush(mp, 0, flags);<br> <span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>if (error)<br> <span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>kprintf("ntfs_unmount: vflush failed(sysnodes): = %d\n",error);<br><font class=3D"Apple-style-span" color=3D"#000000"><font = class=3D"Apple-style-span" = color=3D"#144FAE"><br></font></font></div></blockquote><br></div><div>Hi,<= /div><div><br></div><div>I tried your patch, but it didn't solve the = problem.&nbsp;I'm using a x86_64 kernel from Jan 30th on = xen.</div><div><br></div><div><div>(gdb) bt</div><div>#0 &nbsp;Debugger = (msg=3D&lt;value optimized out&gt;)</div><div>&nbsp;&nbsp; &nbsp;at = /usr/src/sys/platform/pc64/x86_64/db_interface.c:360</div><div>#1 = &nbsp;0xffffffff8036aa0d in panic (fmt=3D0xffffffff8064bb8e "unmount: = dangling vnode")</div><div>&nbsp;&nbsp; &nbsp;at = /usr/src/sys/kern/kern_shutdown.c:742</div><div>#2 = &nbsp;0xffffffff803d3762 in dounmount (mp=3D0xffffffff91f64260, = flags=3D0)</div><div>&nbsp;&nbsp; &nbsp;at = /usr/src/sys/kern/vfs_syscalls.c:783</div><div>#3 = &nbsp;0xffffffff803d38d0 in sys_unmount = (uap=3D0xffffffffb2f07b48)</div><div>&nbsp;&nbsp; &nbsp;at = /usr/src/sys/kern/vfs_syscalls.c:618</div><div>#4 = &nbsp;0xffffffff805c40fa in syscall2 = (frame=3D0xffffffffb2f07bf8)</div><div>&nbsp;&nbsp; &nbsp;at = /usr/src/sys/platform/pc64/x86_64/trap.c:1189</div><div>#5 = &nbsp;0xffffffff805bcce3 in Xfast_syscall ()</div><div>&nbsp;&nbsp; = &nbsp;at /usr/src/sys/platform/pc64/x86_64/exception.S:304</div><div>#6 = &nbsp;0x00007ffffffffa8f in ?? ()</div><div>Reply contains invalid hex = digit 84</div><div><br></div><div>Here's the info I have regarding the = ntfs partition I'm testing with:</div><div><div>vm11 = /usr/src/sys/vfs/ntfs/</div><div>$ df | grep ad2</div><div>/dev/ad2 = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 51200 &nbsp; &nbsp; &nbsp; = 6196 &nbsp; &nbsp; 45004 &nbsp; &nbsp;12% &nbsp; = &nbsp;/mnt</div><div>vm1 /usr/src/sys/vfs/ntfs/</div><div>$ mount | grep = ad2</div><div>/dev/ad2 on /mnt (ntfs, local)</div><div>vm1 = /usr/src/sys/vfs/ntfs/</div><div>$ du &nbsp;/mnt/</div><div>0<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>/mnt/$Extend</div><div>352<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>/mnt/boot/common</div><div>16<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>/mnt/boot/ficl/i386</div><div>16<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>/mnt/boot/ficl/ia64</div><div>81<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>/mnt/boot/ficl/softwords</div><div>16<span class=3D"Apple-tab-span"= style=3D"white-space:pre"> = </span>/mnt/boot/ficl/sparc64</div><div>545<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>/mnt/boot/ficl</div><div>112<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>/mnt/boot/forth</div><div>1025<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>/mnt/boot</div><div>3221<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>/mnt/</div><div><br></div><div>Tim</div></div><div><br></div></div>= </body></html>= --Apple-Mail-1--292580815--