Re: [RFC v3][PATCH 8/9] File descriprtors (dump)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dave Hansen
Date: Thursday, September 4, 2008 - 11:41 am

On Thu, 2008-09-04 at 04:05 -0400, Oren Laadan wrote:

That loop needs some love.  At least save us from one level of
indenting:


My gut also says that there has to be a better way to find a good size
for fdlist() than growing it this way.  

Why do we even have a fixed size for this?

+#define CR_DEFAULT_FDTABLE  256


Why a BUG_ON()?  We'll deref it in just a sec anyway.  We prefer to just
get the NULL dereference rather than an explicit BUG_ON().


Is there a plan to save off the 'struct user' here instead?  Nested user
namespaces in one checkpoint image might get confused otherwise.


Why don't we just store (and use) (inode->i_mode & S_IFMT) in fd_type
instead of making our own types?


Since the kernel always seems to make fds integers, it would make sense
to me to store them as integers in the checkpoint image.  Why bother to
shrink them down to a 16-bit type?


This if() block is in the normal flow path of the function and should go
at the top indentation level.  You can just do this:

	  if (ret < 0)
		goto out;
  	  // if block contents here...

   out:
-- Dave

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC v3][PATCH 0/9] Kernel based checkpoint/restart, Oren Laadan, (Thu Sep 4, 12:57 am)
[RFC v3][PATCH 4/9] Memory management (dump), Oren Laadan, (Thu Sep 4, 1:03 am)
[RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Thu Sep 4, 1:04 am)
[RFC v3][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Thu Sep 4, 1:05 am)
[RFC v3][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Thu Sep 4, 1:06 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Louis Rilling, (Thu Sep 4, 2:47 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Thu Sep 4, 7:43 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Dave Hansen, (Thu Sep 4, 8:01 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Thu Sep 4, 11:08 am)
Re: [RFC v3][PATCH 4/9] Memory management (dump), Dave Hansen, (Thu Sep 4, 11:25 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Dave Hansen, (Thu Sep 4, 11:41 am)
Re: [RFC v3][PATCH 4/9] Memory management (dump), Oren Laadan, (Sat Sep 6, 6:54 pm)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Sat Sep 6, 8:09 pm)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Sat Sep 6, 9:52 pm)
Re: [RFC v3][PATCH 4/9] Memory management (dump), Dave Hansen, (Mon Sep 8, 8:55 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Mon Sep 8, 9:49 am)
Re: [RFC v3][PATCH 8/9] File descriprtors (dump), Dave Hansen, (Mon Sep 8, 9:57 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Mon Sep 8, 11:01 pm)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 2:42 pm)
Cleanups for: [PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 3:00 pm)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Thu Sep 11, 12:37 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Serge E. Hallyn, (Thu Sep 11, 8:38 am)
Re: [RFC v3][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Fri Sep 12, 9:34 am)