Alexander Eremin wrote:
> On Fri, 2009-11-06 at 08:00 -0500, Joseph J VLcek wrote:
>> Alexander Eremin wrote:
>>> On Thu, 2009-11-05 at 09:25 -0800, Glenn Lagasse wrote:
>>>> Hi Alexander,
>>>>
>>>> * Alexander Eremin (eremin at milax.org) wrote:
>>>>> Changing cycle for test on:
>>>>> while [[ ${loop_cnt} -lt ${umount_loop} ]]; do
>>>>>
>>>>>
>>>>>
>>>>> # umount new slice
>>>>>
>>>>> umount -f $s0bdev > /dev/null 2>&1
>>>>>
>>>>> if [[ $? -eq 0 ]]; then
>>>>>
>>>>> echo "UMOUNT!"
>>>>>
>>>>> #break;
>>>>>
>>>>> fi
>>>>>
>>>>> # if the umount failed try again in a second
>>>>>
>>>>> sleep 1
>>>>>
>>>>> echo $loop_cnt
>>>>>
>>>>> (( loop_cnt=${loop_cnt} + 1 ))
>>>>>
>>>>>
>>>>>
>>>>> done
>>>>>
>>>>> echo "Done"
>>>>> exit 0
>>>>>
>>>>> I've got:
>>>>> # ./usbcopy osol121.usb
>>>>> Found the following USB devices:
>>>>> 0: /dev/rdsk/c2t0d0p0 976.5 MB Multi Flash Reader
>>>>> 1.00
>>>>> Enter the number of your choice: 0
>>>>>
>>>>> WARNING: All data on your USB storage will be lost.
>>>>> Are you sure you want to install to
>>>>> Multi Flash Reader 1.00, 976 MB at /dev/rdsk/c2t0d0p0 ? (y/n) y
>>>>> 0
>>>>> 1
>>>>> 2
>>>>> 3
>>>>> UMOUNT!
>>>>> 4
>>>>> UMOUNT!
>>>>> 5
>>>>> 6
>>>>> 7
>>>>> 8
>>>>> 9
>>>>> 10
>>>>> 11
>>>>> 12
>>>>> 13
>>>>> 14
>>>>> Done
>>>>>
>>>>> Sometimes hal doing even three-four mounts. 15sec is enough, so if we
>>>>> must have hal running, just non-breakable cycle is required.
>>>> So I'll just pipe in and say that disabling HAL for it's aggressive
>>>> mount issues is a workaround, not a real solution (and thus not
>>>> something we should be introducing, which it sounds like you're not
>>>> suggesting anyway). See 11654 and 11429 for defects against
>>>> HAL/usbcopy.
>>>>
>>>> Cheers!
>>>>
>>> Ok, I leave this part for those who will solve this hal problem for
>>> 11654,11429. So just fixing 10098 - review in old place:
>>> http://cr.opensolaris.org/~alhazred/10098/
>>>
>>> Regards,
>>> Alex
>>> _______________________________________________
>>> caiman-discuss mailing list
>>> caiman-discuss at opensolaris.org
>>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>>
>> Alex,
>>
>> This version still contains:
>>
>> 182 break;
>>
>> From what you wrote above I thought this prevented catching the case
>> when hal is doing the three-four mounts.
>>
>> Shouldn't this be changed from:
>> -------------------------------
>>
>> 175 typeset -i umount_loop=15
>> 176 typeset -i loop_cnt=0
>> 177
>>
>>
>> 178 while [[ ${loop_cnt} -lt ${umount_loop} ]]; do
>>
>> 179 # umount new slice
>>
>> 180 umount -f $s0bdev > /dev/null 2>&1
>>
>> 181 if [[ $? -eq 0 ]]; then
>>
>> 182 break;
>>
>> 183 fi
>>
>> 184 # if the umount failed try again in a second
>>
>> 185 sleep 1
>>
>> 186 (( loop_cnt=${loop_cnt} + 1 ))
>>
>> 187 done
>>
>> Changed to:
>> -----------
>>
>> typeset -i umount_loop=15
>> typeset -i loop_cnt=0
>>
>> while [[ ${loop_cnt} -lt ${umount_loop} ]]; do
>> # umount new slice
>> umount -f $s0bdev > /dev/null 2>&1
>>
>> # In case HAL remounted try again in a second
>> sleep 1
>> (( loop_cnt=${loop_cnt} + 1 ))
>> done
>>
>> Joe
> Done, webrev's updated.
>
> Regards,
> Alex
Looks good!
Thanks! Joe