Thread View: muc.lists.netbsd.source-changes
2 messages
2 total messages
Started by Taylor R Campbell
Mon, 19 Oct 2026 17:10
Re: CVS commit: src
Author: Taylor R Campbell
Date: Mon, 19 Oct 2026 17:10
Date: Mon, 19 Oct 2026 17:10
57 lines
4084 bytes
4084 bytes
> Module Name: src
> Committed By: tls
> Date: Sun Oct 18 14:56:33 UTC 2026
>
> Modified Files:
> src/sbin/raidctl: raidctl.c rf_configure.c
> src/sys/dev/raidframe: raidframevar.h rf_diskqueue.c rf_diskqueue.h
> rf_netbsdkintf.c
>
> Log Message:
> Fix PR kern/60896 queue-length bugs in RAIDframe configuration.
>
> ...
>
> + if (clabel->maxOutstanding <= 0)
> + config->maxOutstandingDiskReqs = RF_DEFAULT_QUEUE_DEPTH;
> + else if (clabel->maxOutstanding > RF_MAX_QUEUE_DEPTH)
> + config->maxOutstandingDiskReqs = RF_MAX_QUEUE_DEPTH;
> + else
> + config->maxOutstandingDiskReqs =
> + (uint8_t)clabel->maxOutstanding;
Did you forget to change maxOutstandingDiskReqs from `char' to
`unsigned char' or `uint8_t'?
The clang build is failing now on platforms where char is signed:
> /home/source/ab/HEAD-llvm/src/sys/rump/dev/lib/libraidframe/../../../../dev/raidframe/rf_netbsdkintf.c:3512:36: error: implicit conversion from 'int' to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
> config->maxOutstandingDiskReqs = RF_MAX_QUEUE_DEPTH;
> ~ ^~~~~~~~~~~~~~~~~~
> /home/source/ab/HEAD-llvm/src/sys/rump/dev/lib/libraidframe/../../../../dev/raidframe/raidframevar.h:338:28: note: expanded from macro 'RF_MAX_QUEUE_DEPTH'
> #define RF_MAX_QUEUE_DEPTH 255
> ^~~
> 1 error generated.
> --- rf_netbsdkintf.pico ---
321 struct RF_Config_s {
...
336 char maxOutstandingDiskReqs; /* # concurrent reqs to be sent to a
337 * disk (uint8_t, 1..255). */
https://nxr.netbsd.org/xref/src/sys/dev/raidframe/raidframevar.h?r=1.24#336
Perhaps there are enough casts downstream that this hasn't created new
runtime issues, but it's bad if the declared type is mismatched with
reality so that all actual uses require casts.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: CVS commit: src
Author: Thor Lancelot Simon
Date: Mon, 19 Oct 2026 22:06
Date: Mon, 19 Oct 2026 22:06
15 lines
2023 bytes
2023 bytes
On Mon, Oct 19, 2026 at 05:10:38PM +0000, Taylor R Campbell wrote: > > Did you forget to change maxOutstandingDiskReqs from `char' to > `unsigned char' or `uint8_t'? > > The clang build is failing now on platforms where char is signed: Sigh. Yeah, sorry, GCC, needless to complain, didn't warn on that, and I missed it. Thor -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads