[CRIU] [RFC PATCH 1/6] reserve the extra room in fstypes[]

Oleg Nesterov oleg at redhat.com
Mon Mar 30 07:31:39 PDT 2015


On 03/30, Pavel Emelyanov wrote:
>
> On 03/27/2015 08:55 PM, Oleg Nesterov wrote:
> >
> > -static struct fstype fstypes[] = {
> > +static struct fstype fstypes[32] = {
>
> This means that we can only add "32 - current_amount" of FSs run time.
> This is not bad at the moment, but once we add more in this list we
> will likely forget to extend this :)

That is why I think WARN_ON() makes sense (see the next changes), to
ensure it never fails silently because we forget to extend it ;)

> Can we better make this thing dynamically allocated?

Yes, sure. the only problem is that this needs a bit more trivial but
boring coding...

Unless you object I'd prefer to keep this fstypes[] array in the initial
version, then I can another simple patch which turns it into list.

Oleg.



More information about the CRIU mailing list