Re: [RFC][PATCH 09/11] check files for checkpointability

From: Dave Hansen
Date: Thu Mar 12 2009 - 15:14:45 EST


On Mon, 2009-03-09 at 10:38 -0700, Matt Helsley wrote:
> On Thu, Mar 05, 2009 at 08:39:10AM -0800, Dave Hansen wrote:
> > +static void __scan_files_for_cr(struct files_struct *files)
> > +{
> > + int i;
> > +
> > + for (i = 0; i < files->fdtab.max_fds; i++) {
> > + struct file *f = fcheck_files(files, i);
> > + if (!f)
> > + continue;
> > + if (cr_file_supported(f))
> > + continue;
> > + files_deny_checkpointing(files);
>
> At this point couldn't we skip the rest of the loop iterations?

As it stands, yeah. That makes sense.

> Might it also be useful to print a path to f here? So not only would
> the log show the location in the kernel source but we'd also get some
> idea of which file caused the problem? Of course "f" isn't always
> available everywhere we call files_deny_checkpointing()..

Also a good suggestion. That would help the readability of the warning
a bunch.

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/