]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hugetlbfs: accept subpool min_size mount option and setup accordingly
authorMike Kravetz <mike.kravetz@oracle.com>
Tue, 7 Apr 2015 23:44:29 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:29 +0000 (09:44 +1000)
commit501ef4127b43b1baf0b42e02e2abf903aa7ecb61
tree6220c6ad31cb783bcf28fdd091487b5b4b88771d
parentbfeaeb6c5c3423d68675b97ff554435a19c345c7
hugetlbfs: accept subpool min_size mount option and setup accordingly

Make 'min_size=<value>' be an option when mounting a hugetlbfs.  This
option takes the same value as the 'size' option.  min_size can be
specified without specifying size.  If both are specified, min_size must
be less that or equal to size else the mount will fail.  If min_size is
specified, then at mount time an attempt is made to reserve min_size
pages.  If the reservation fails, the mount fails.  At umount time, the
reserved pages are released.

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hugetlbfs/inode.c
include/linux/hugetlb.h
mm/hugetlb.c