lkml.org 
[lkml]   [2009]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC][PATCH 6/8] mark /dev/null and zero as checkpointable
From
Date

We currently have a special_file() check in the checkpoint
code which considers all special files as uncheckpointable.

Now that we have the f_op and a generic function, use that
to override these simple devices and make them OK to
checkpoint.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
---

linux-2.6.git-dave/drivers/char/mem.c | 3 +++
1 file changed, 3 insertions(+)

diff -puN drivers/char/mem.c~make-dev-null-work drivers/char/mem.c
--- linux-2.6.git/drivers/char/mem.c~make-dev-null-work 2009-02-27 12:07:39.000000000 -0800
+++ linux-2.6.git-dave/drivers/char/mem.c 2009-02-27 12:07:39.000000000 -0800
@@ -27,6 +27,7 @@
#include <linux/splice.h>
#include <linux/pfn.h>
#include <linux/smp_lock.h>
+#include <linux/checkpoint.h>

#include <asm/uaccess.h>
#include <asm/io.h>
@@ -824,6 +825,7 @@ static const struct file_operations null
.read = read_null,
.write = write_null,
.splice_write = splice_write_null,
+ .checkpoint = generic_file_checkpoint,
};

#ifdef CONFIG_DEVPORT
@@ -840,6 +842,7 @@ static const struct file_operations zero
.read = read_zero,
.write = write_zero,
.mmap = mmap_zero,
+ .checkpoint = generic_file_checkpoint,
};

/*
_

\
 
 \ /
  Last update: 2009-02-27 21:39    [W:0.190 / U:13.988 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site