lkml.org 
[lkml]   [2009]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 09/11] check files for checkpointability
From
Date
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



\
 
 \ /
  Last update: 2009-03-12 20:17    [W:1.219 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site