[Devel] Re: [C/R v20][PATCH 46/96] c/r: add checkpoint operation for opened files of generic filesystems

Andreas Dilger adilger at sun.com
Wed Mar 17 14:09:00 PDT 2010


On 2010-03-17, at 10:08, Oren Laadan wrote:
> These patches extend the use of the generic file checkpoint  
> operation to
> non-extX filesystems which have lseek operations that ensure we can  
> save
> and restore the files for later use. Note that this does not include
> things like FUSE, network filesystems, or pseudo-filesystem kernel
> interfaces.

I didn't see any other patches posted to linux-fsdevel regarding what  
this code is, or what it is supposed to be doing.  Could you please  
repost the patches related to generic_file_checkpoint(), and the  
overview email that explains what you mean by "checkpoint".  I'm  
assuming this is related to HPC/process restart/migration, but better  
to not guess.

> @@ -718,6 +718,7 @@ static const struct file_operations  
> btrfs_ctl_fops = {
> 	.unlocked_ioctl	 = btrfs_control_ioctl,
> 	.compat_ioctl = btrfs_control_ioctl,
> 	.owner	 = THIS_MODULE,
> +	.checkpoint = generic_file_checkpoint,
> };
>
> const struct file_operations exofs_file_operations = {
> 	.llseek		= generic_file_llseek,
> +	.checkpoint	= generic_file_checkpoint,
> 	.read		= do_sync_read,
> 	.write		= do_sync_write,
> 	.aio_read	= generic_file_aio_read,
>
> static const struct file_operations hostfs_file_fops = {
> 	.llseek		= generic_file_llseek,
> +	.checkpoint	= generic_file_checkpoint,
> 	.read		= do_sync_read,
> 	.splice_read	= generic_file_splice_read,
> 	.aio_read	= generic_file_aio_read,
> @@ -430,6 +431,7 @@ static const struct file_operations  
> hostfs_file_fops = {
>
> static const struct file_operations hostfs_dir_fops = {
> 	.llseek		= generic_file_llseek,
> +	.checkpoint	= generic_file_checkpoint,
> 	.readdir	= hostfs_readdir,
> 	.read		= generic_read_dir,
> };
>
> const struct file_operations nilfs_file_operations = {
> 	.llseek		= generic_file_llseek,
> +	.checkpoint	= generic_file_checkpoint,
> 	.read		= do_sync_read,
> 	.write		= do_sync_write,
> 	.aio_read	= generic_file_aio_read,


Minor nit - it would be good to add this method in the same place in  
all of the *_file_operation structures for consistency.  Ideally these  
would already be in the order that they are declared in the structure,  
but at least new ones should be added consistently.

> static const struct vm_operations_struct nfs_file_vm_ops = {
> 	.fault = filemap_fault,
> 	.page_mkwrite = nfs_vm_page_mkwrite,
> +#ifdef CONFIG_CHECKPOINT
> +	.checkpoint = filemap_checkpoint,
> +#endif
> };

Why is this one conditional, but the others are not?


Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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




More information about the Devel mailing list