]> Zhao Yanbai Git Server - minix.git/commit
Extend dupfrom(2) into copyfd(2)
authorDavid van Moolenbroek <david@minix3.org>
Sat, 5 Oct 2013 14:31:35 +0000 (16:31 +0200)
committerLionel Sambuc <lionel@minix3.org>
Sat, 1 Mar 2014 08:04:58 +0000 (09:04 +0100)
commite5cc85fdc42b84c6b41da59404eea7b0fc8c42a1
treed3cf6d59a9acfe210d42f2846b11335f0c8c44a6
parent50685cbec34c4010c01a9edd5cc3344519aaac55
Extend dupfrom(2) into copyfd(2)

This single function allows copying file descriptors from and to
processes, and closing a previously copied remote file descriptor.
This function replaces the five FD-related UDS backcalls. While it
limits the total number of in-flight file descriptors to OPEN_MAX,
this change greatly improves crash recovery support of UDS, since all
in-flight file descriptors will be closed instead of keeping them
open indefinitely (causing VFS to crash on system shutdown). With the
new copyfd call, UDS becomes simpler, and the concept of filps is no
longer exposed outside of VFS.

This patch also moves the checkperms(2) stub into libminlib, thus
fully abstracting away message details of VFS communication from UDS.

Change-Id: Idd32ad390a566143c8ef66955e5ae2c221cff966
20 files changed:
drivers/uds/Makefile
drivers/uds/ioc_uds.c
drivers/uds/uds.h
drivers/uds/vfs_uds.c [deleted file]
drivers/vnd/NOTES
drivers/vnd/vnd.c
etc/system.conf
include/lib.h
include/minix/callnr.h
include/minix/com.h
lib/libminlib/Makefile
lib/libminlib/checkperms.c [new file with mode: 0644]
lib/libminlib/copyfd.c [new file with mode: 0644]
lib/libminlib/dupfrom.c [deleted file]
servers/pm/table.c
servers/vfs/filedes.c
servers/vfs/path.c
servers/vfs/proto.h
servers/vfs/table.c
test/tvnd.c