From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oren Laadan Subject: Re: [RFC v14-rc3][PATCH 11/36] add generic checkpoint f_op to ext fses Date: Sat, 11 Apr 2009 23:42:54 -0400 Message-ID: <49E1633E.1000601@cs.columbia.edu> References: <1239107264-21775-1-git-send-email-orenl@cs.columbia.edu> <1239107264-21775-12-git-send-email-orenl@cs.columbia.edu> <20090409015926.GA20112@us.ibm.com> <20090409022940.GA22284@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090409022940.GA22284-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Serge E. Hallyn" Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Dave Hansen List-Id: containers.vger.kernel.org Serge E. Hallyn wrote: > Quoting Serge E. Hallyn (serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org): >> Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org): >>> From: Dave Hansen >>> >>> This marks ext[234] as being checkpointable. There will be many >>> more to do this to, but this is a start. >>> >>> Signed-off-by: Dave Hansen >>> --- >>> fs/ext2/dir.c | 1 + >>> fs/ext2/file.c | 2 ++ >>> fs/ext3/dir.c | 1 + >>> fs/ext3/file.c | 1 + >>> fs/ext4/dir.c | 1 + >>> fs/ext4/file.c | 1 + >>> 6 files changed, 7 insertions(+), 0 deletions(-) >>> >>> diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c >>> index 2999d72..4f1dd79 100644 >>> --- a/fs/ext2/dir.c >>> +++ b/fs/ext2/dir.c >>> @@ -721,4 +721,5 @@ const struct file_operations ext2_dir_operations = { >>> .compat_ioctl = ext2_compat_ioctl, >>> #endif >>> .fsync = ext2_sync_file, >>> + .checkpoint = generic_file_checkpoint, >> The checkpoint() method is only defined in struct file_operations if >> CONFIG_CHECKPOINT=y. So this can't possibly compile when >> CONFIG_CHECKPOINT=n... > > BTW i think the better way to handle it is not to put everything under > ifdefs, but rather always let file_operations have the ->checkpoint() > fn, and just make generic_file_checkpoint() a dummy function when > CONFIG_CHECKPOINT=n. Yes, that's already taken care of (further up in fs.h) in previous patch. It was silly to wrap #ifdef's around the 'checkpoint' field of 'struct file_operations' Thanks, Oren.