Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 13:35:42 +0200
From:      Gleb Kurtsou <gleb.kurtsou@gmail.com>
To:        Jaakko Heinonen <jh@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: tmpfs maximum file size limit
Message-ID:  <20100122113542.GA1662@tops>
In-Reply-To: <20100122072038.GA977@a91-153-117-195.elisa-laajakaista.fi>
References:  <201001080757.o087vhrr009799@svn.freebsd.org> <20100109051536.R57595@delplex.bde.org> <20100108214821.GA985@a91-153-117-195.elisa-laajakaista.fi> <20100110181132.D1354@besplex.bde.org> <20100122072038.GA977@a91-153-117-195.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On (22/01/2010 09:20), Jaakko Heinonen wrote:
> 
> Unless I am missing something tmpfs maximum file size limit useless
> because it is set to the total amount of memory in the system including
> swap ((cnt.v_page_count + get_swpgtotal()) * PAGE_SIZE). In addition,
> it's wrong because it's set at mount time and swap space may be added or
> removed after the mount.
> 
> So I propose adding a new mount mount option to make the limit
> configurable at mount time and by default setting it to UINT64_MAX ("no
> limit").
Yes, that's why I removed it in the first place. I was using INT_MAX,
but UINT64_MAX would be even better. I like the patch.

Thanks,
Gleb.
> ---
> 
> Add "maxfilesize" mount option for tmpfs to allow specifying the
> maximum file size limit. Default is UINT64_MAX when the option is
> not specified.
> 
> Use tmpfs_mem_info() rather than get_swpgtotal() in tmpfs_mount() to
> check if there is enough memory available.
> 
> Remove now unused get_swpgtotal().
> 
> The patch:
> 
> http://people.freebsd.org/~jh/patches/tmpfs-maxfilesize.diff
> 
> -- 
> Jaakko



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100122113542.GA1662>