FreeBSD Bugzilla – Attachment 220284 Details for
Bug 251610
rc.d/zpool runs before ada(4) attaches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
extend rc.d/dumpon to check and delay for cam(4) probing
rc_d_dumpon-camcheckdelay.patch (text/plain), 1.63 KB, created by
Harald Schmalzbauer
on 2020-12-05 17:41:18 UTC
(
hide
)
Description:
extend rc.d/dumpon to check and delay for cam(4) probing
Filename:
MIME Type:
Creator:
Harald Schmalzbauer
Created:
2020-12-05 17:41:18 UTC
Size:
1.63 KB
patch
obsolete
>Index: src/libexec/rc/rc.d/dumpon >=================================================================== >--- src/libexec/rc/rc.d/dumpon (revision 368353) >+++ src/libexec/rc/rc.d/dumpon (working copy) >@@ -35,6 +35,49 @@ > > dumpon_start() > { >+ local n=4 camlist=`camcontrol devlist -v` >+ >+ # Wait for cam(4) devices attaching, 4 times at max by increasing >+ # 1s each (10s max in total) >+ # With root-MFS, it's likely that root_hold_wait() shortcuts >+ # before cam(4) probing finishes. In that case, we have /, but >+ # probably not /usr, so we don't utilize grep(1) e.g. >+ # Run unconditionally of dumpdev_enable setting, >+ # rcorder(8) dictates to do the delay at this place. >+ # >+ >+ while [ -n "${camlist}" ]; do >+ >+ echo "${camlist}" | while read line; do >+ # Skip line without "target 0 lun 0" pattern >+ [ X"${line}" != \ >+ X"${line#*target [[:xdigit:]]* lun [[:xdigit:]]*}" ] \ >+ || continue >+ >+ # If prefilterd line doesn't end with () or probe), we >+ # continue checking next line >+ [ X"${line% ()}" == X"${line}" ] && >+ [ X"${line%probe)}" == X"${line}" ] && >+ continue >+ >+ return $n # no need to check remaining lines >+ done >+ camlist=$? # recycle to be refreshed camlist variable >+ >+ # $camlist is 0 if every line was no match obove, so simply >+ # break before delaying rc(8), since cam seems to be ready. >+ [ $camlist -gt 0 -a $camlist -le 4 ] || break >+ >+ # Initialize counter once only >+ [ $camlist -eq 4 ] && n=0 >+ >+ sleep $((n+=1)) >+ [ $n -lt 4 ] || break >+ camlist=`camcontrol devlist -v` >+ >+ done >+ >+ > # Enable dumpdev so that savecore can see it. Enable it > # early so a crash early in the boot process can be caught. > #
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251610
:
220284
|
222477
|
230308