OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH 1/2] pipe: header file and removal of dupfd()'s static
[RFC][PATCH 1/2] pipe: header file and removal of dupfd()'s static [message #17403] Mon, 29 January 2007 22:48
Masahiko Takahashi is currently offline  Masahiko Takahashi
Messages: 9
Registered: December 2006
Junior Member
[RFC][PATCH 1/2] pipe: header file and removal of dupfd()'s static

Defines data structures in order to use checkpointing a pipe.
Also, dupfd() in fcntl.c is called in restoring pipe so as to
install struct file pointer to the specified file descriptor.

Masahiko.


--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ linux-2.6.19.2/include/linux/cr.h	2007-01-22 15:19:28.000000000 -0800
@@ -0,0 +1,27 @@
+#ifndef	_LINUX_CR_H
+#define	_LINUX_CR_H
+
+/*
+ *	include/linux/cr.h
+ *	
+ *	checkpoint and restart
+ */
+
+struct cr_pipe_buffer_info {
+	unsigned int offset, len, flags;
+};
+
+struct cr_pipe_buffer {
+	char buf[PAGE_SIZE];
+	struct cr_pipe_buffer_info info;
+};
+		
+struct cr_pipe {
+	int nrbufs;
+	// waiter, fasync ...
+	struct cr_pipe_buffer bufs[PIPE_BUFFERS];
+};
+
+extern int dupfd(struct file *file, unsigned int start);
+
+#endif
--- linux-2.6.19.2/fs/fcntl.c.original	2007-01-10 11:10:37.000000000 -0800
+++ linux-2.6.19.2/fs/fcntl.c	2007-01-15 16:36:56.000000000 -0800
@@ -111,7 +111,7 @@ out:
 	return error;
 }
 
-static int dupfd(struct file *file, unsigned int start)
+int dupfd(struct file *file, unsigned int start)
 {
 	struct files_struct * files = current->files;
 	struct fdtable *fdt;

_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
Previous Topic: [patch 1/1] net namespace: fix bad keepalive timer refcounting
Next Topic: [RFC][PATCH 2/2] pipe: checkpoint and restart entity
Goto Forum:
  


Current Time: Thu Jul 31 03:23:42 GMT 2025

Total time taken to generate the page: 0.14465 seconds