lkml.org 
[lkml]   [2008]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v10][PATCH 08/13] Dump open file descriptors
From
Date
On Mon, 2008-12-01 at 15:23 -0500, Oren Laadan wrote:
> Verifying that the size doesn't change does not ensure that the table's
> contents remained the same, so we can still end up with obsolete data.

With the realloc() scheme, we have virtually no guarantees about how the
fdtable that we read relates to the source. All that we know is that
the n'th fd was at this value at *some* time.

Using the scheme that I just suggested (and you evidently originally
used) at least guarantees that we have an atomic copy of the fdtable.

Why is this done in two steps? It first grabs a list of fd numbers
which needs to be validated, then goes back and turns those into 'struct
file's which it saves off. Is there a problem with doing that
fd->'struct file' conversion under the files->file_lock?

-- Dave



\
 
 \ /
  Last update: 2008-12-01 21:53    [W:0.174 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site