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

Dave Hansen dave at linux.vnet.ibm.com
Thu Mar 12 12:14:29 PDT 2009


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

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list