Re: ZFS: i/o error - all block copies unavailable after upgradin

看板FB_current作者時間14年前 (2011/09/10 16:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/18 (看更多)
on 10/09/2011 10:32 Andriy Gapon said the following: > I am now investigating what looks like a miscompilation of the code by *gcc* > after applying the patch. It seems that -mrtd option is to blame. > I have found an older discussion about the -mrtd option causing trouble with clang: > http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026263.html > There was a patch that made clang happy without disabling the flag, so I wonder > if I made some subtle mistake in my patch. Or maybe it's better to disable mrtd > altogether for the zfs boot blocks, just to stay on the safe side. Actually, removing either -mrtd _or_ -fno-unit-at-a-time produces the correct code. Puzzled. > Some technical details in the form of a diff with some superimposed comments: > --- /home/avg/tmp/vdev_read_phys-mrtd.s 2011-09-10 01:50:54.500620864 +0300 > +++ /home/avg/tmp/vdev_read_phys-no-mrtd.s 2011-09-10 01:49:59.157701373 +0300 > @@ -29,16 +29,17 @@ > ... <- in the code before this %edi gets assigned a pointer to a function > movl 60(%ecx), %eax > movl %eax, 24(%esp) > movl %ecx, 20(%esp) > + movl %edi, %ecx <- non-mrtd code saves the pointer > popl %ebx > popl %esi > popl %edi <- %edi gets over-written with an unrelated value > popl %ebp > - jmp *%edi <- mrtd code calls some garbage code > + jmp *%ecx <- non-mrtd code calls the correct code > .L601: > movl $5, %eax > popl %ebx > popl %esi > popl %edi > popl %ebp > - ret $24 > + ret > > The problem is in the patched vdev_read_phys function in zfsimpl.c. > Unpatched version of the function doesn't seem to be affected. > > Any help/ideas will be greatly appreciated! > -- Andriy Gapon _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1EQo23Yr (FB_current)
討論串 (同標題文章)
完整討論串 (本文為第 9 之 18 篇):
文章代碼(AID): #1EQo23Yr (FB_current)