Re: read() MAX_IO_SIZE bytes, more than SSIZE_MAX?

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

 



Torsten Bögershausen <tboegi <at> web.de> writes:

> 
> On 2015-02-07 17.45, Joachim Schmitz wrote:
<snip>
> 
> How about changing wrapper.c like this:
> 
> #ifndef MAX_IO_SIZE
>  #define MAX_IO_SIZE (8*1024*1024)
> #endif
> ---------------------
> and to change config.mak.uname like this:
> 
> ifeq ($(uname_S),NONSTOP_KERNEL)
> 
> 	BASIC_CFLAGS += -DMAX_IO_SIZE=(32*1024)
> Does this work for you ?

Of course it would, but, 
a) 32k is smaller than we can go (and yes, we could make it 52k)
b) never ever should read() be asked to read more than SSIZE_MAX, this  
should be true for every platform on the planet? You may want to have is 
smaller than SSIZE_MAX (like the current 8MB vs. the possible 2TB on 
Linux), but surely never larger?

Bye, Jojo��.n��������+%������w��{.n��������n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[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]