tmpfs maximum file size limit

Gleb Kurtsou gleb.kurtsou at gmail.com
Fri Jan 22 11:35:47 UTC 2010


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


More information about the freebsd-fs mailing list