Re: [RFC v14-rc3][PATCH 11/36] add generic checkpoint f_op to ext fses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Serge E. Hallyn (serue@xxxxxxxxxx):
> Quoting Oren Laadan (orenl@xxxxxxxxxxxxxxx):
> > From: Dave Hansen <dave@xxxxxxxxxxxxxxxxxx>
> > 
> > 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 <dave@xxxxxxxxxxxxxxxxxx>
> > ---
> >  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.

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

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux