JFFS2: Add parameter to reserve disk space for root
authorDaniel Drake <dsd@laptop.org>
Tue, 10 Apr 2012 21:22:35 +0000 (22:22 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 14 May 2012 03:51:29 +0000 (22:51 -0500)
commit8da8ba2ea6ad52ea8558384f38586b0c1a516e9d
treed11d632886c481758b51cd5b9129dc0a5b94c7bd
parent886bd33da7cfb1f6c7f3396f7146278ed02e76a7
JFFS2: Add parameter to reserve disk space for root

Add a new rp_size= parameter which creates a "reserved pool" of disk
space which can only be used by root. Other users are not permitted
to write to disk when the available space is less than the pool size.

Based on original code by Artem Bityutskiy in
https://dev.laptop.org/ticket/5317

[dwmw2: use capable(CAP_SYS_RESOURCE) not uid/gid check, fix debug prints]
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
fs/jffs2/jffs2_fs_sb.h
fs/jffs2/nodemgmt.c
fs/jffs2/super.c