Re: [PATCH 2/2] read-cache: fix incorrect count and progress bar stalling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

>> So I think this pattern works:
>>
>> 	for (i = 0; i < nr; i++) {
>> 		display_progress(p, i);
>> 		/* work work work */
>> 	}
>> 	display_progress(p, nr);
>>
>> Alternatively, if the work part doesn't contain continue statements:
>>
>> 	for (i = 0; i < nr; i++) {
>> 		/* work work work */
>> 		display_progress(p, i + 1);
>> 	}
>
> But yes, I agree with the issue in theory, but I think in practice we
> don't need to worry about these 100% cases.

Hmph, but in practice we do need to worry, don't we?  Otherwise you
wouldn't have started this thread and René wouldn't have responded.

I agree with the issue and I think we should count what we have
finished.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux