Date: Fri, 22 Jan 2010 09:20:38 +0200 From: Jaakko Heinonen <jh@FreeBSD.org> To: freebsd-fs@FreeBSD.org Subject: tmpfs maximum file size limit Message-ID: <20100122072038.GA977@a91-153-117-195.elisa-laajakaista.fi> In-Reply-To: <20100110181132.D1354@besplex.bde.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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"). --- 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?20100122072038.GA977>