Preventing FS full

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Oct 28 11:31:37 EDT 2010


David Woodhouse <dwmw2 at infradead.org> wrote on 2010/10/28 16:39:08:
>
> On Thu, 2010-10-28 at 16:24 +0200, Joakim Tjernlund wrote:
> > Is there any way to temporarily lower the FS full limit(preferably on
> > a process basis) on JFFS2?
> >
> > I want to safeguard the OS from FS full due to some process filling up
> > the disk.
>
> The thresholds are in the resv_blocks_* variables and should be
> relatively easy to tweak. I've toyed with the idea of exposing them in
> sysfs. Tweaking them on a per-process basis is slightly less trivial but
> shouldn't be that hard... you could add a certain number if the process
> has CAP_SYS_RESOURCE or something.

Will have a look.

>
> Although it should *never* be possible to actually fill the space.

hmm, don't quite get that. Isn't it possible to write until the FS is full.
Surley you must at some pint return ENOSPC to user space and then you
cannot write more files. or ...?

       Jocke




More information about the linux-mtd mailing list