Current-Users archive

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

Re: tmpfs sizing problems (i386, 4GB mem)



Wolfgang Solfrank <Wolfgang%Solfrank.net@localhost> wrote:
> I just fell onto another, probably unrelated problem with tmpfs
> sizing.  My box normally runs with a tmpfs size of 4 GB.  This size
> is correctly transferred into the kernel parameters for the fs.
> However, in tmpfs_bytes_max, the returned value is the result of
> a call to min with some computed value and this stored size.  This
> routine is declared to return an int, and thus only the low half
> of the 64 bit value is checked and returned, in my case a zero.
> This leads shortly to a panic.
> 
> The attached patch fixed this for me.

Good catch, I believe it is the same problem.  Committed the patch, thanks!

Part of the reason why I prefer to have ffs32(), instead of ffs() and so on.
We should probably look for killing min()/max() in favour of MIN()/MAX() or
at least renaming it to indicate the type.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index