summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hurd/fs.defs6
-rw-r--r--hurd/fsys.defs16
-rw-r--r--hurd/fsys_reply.defs4
-rw-r--r--libdiskfs/conch-fetch.c8
-rw-r--r--libdiskfs/conch-set.c2
-rw-r--r--libdiskfs/dir-chg.c2
-rw-r--r--libfshelp/fshelp.h9
-rw-r--r--libiohelp/iohelp.h2
8 files changed, 35 insertions, 14 deletions
diff --git a/hurd/fs.defs b/hurd/fs.defs
index 11b8a8f5..e4ef2861 100644
--- a/hurd/fs.defs
+++ b/hurd/fs.defs
@@ -167,7 +167,7 @@ routine file_getlinknode (
filesystem cannot be NFS mounted. */
routine file_getfh (
file: file_t;
- out filehandle: data_t);
+ out filehandle: data_t, dealloc);
/* Operations supported on directories */
@@ -198,7 +198,7 @@ routine dir_lookup (
data regardless. */
routine dir_readdir (
dir: file_t;
- out data: data_t;
+ out data: data_t, dealloc;
entry: int;
nentries: int;
bufsiz: vm_size_t;
@@ -283,7 +283,7 @@ routine file_set_translator (
/* Return the stored permanent translator for this file. */
routine file_get_translator (
file: file_t;
- out translator: data_t);
+ out translator: data_t, dealloc);
/* Return the translator control port to the
active translator (if any) for this file. */
diff --git a/hurd/fsys.defs b/hurd/fsys.defs
index 9dd7b2fa..2da29501 100644
--- a/hurd/fsys.defs
+++ b/hurd/fsys.defs
@@ -70,6 +70,22 @@ routine fsys_getfile (
filehandle: data_t;
out file: mach_port_send_t);
+/* Sync a filesystem. Args are the same as for file_syncfs in fs.defs. */
+routine fsys_syncfs (
+ fsys: fsys_t;
+ RPT
+ wait: int;
+ do_children: int);
+
+/* Change the readonly status of the filesystem. FORCE (when changing
+ from writeable to readonly) means that existing open ports for writing
+ should be ignored. */
+routine fsys_mod_readonly (
+ fsys: fsys_t;
+ RPT
+ readonly: int;
+ force: int);
+
/* The following two calls are only implemented by bootstrap filesystems. */
routine fsys_getpriv (
diff --git a/hurd/fsys_reply.defs b/hurd/fsys_reply.defs
index 2d0888c6..bb649e60 100644
--- a/hurd/fsys_reply.defs
+++ b/hurd/fsys_reply.defs
@@ -40,6 +40,10 @@ skip; /* getfile */
skip; /* getpriv */
+skip; /* fsys_syncfs */
+
+skip; /* fsys_mod_readonly */
+
simpleroutine fsys_init_reply (
reply_port: reply_port_t;
retcode: kern_return_t);
diff --git a/libdiskfs/conch-fetch.c b/libdiskfs/conch-fetch.c
index c4839ba3..164b32ea 100644
--- a/libdiskfs/conch-fetch.c
+++ b/libdiskfs/conch-fetch.c
@@ -38,7 +38,7 @@ ioserver_fetch_shared_data (void *arg)
{
/* The user can validly set the size, but block the attempt
if we are readonly. */
- if (readonly)
+ if (diskfs_readonly)
cred->mapped->file_size = cred->po->np->dn_stat.st_size;
else
{
@@ -49,12 +49,12 @@ ioserver_fetch_shared_data (void *arg)
cred->po->filepointer = cred->mapped->xx_file_pointer;
- if (!readonly)
+ if (!diskfs_readonly)
{
if (cred->mapped->written)
- cred->po->ip->dn_set_mtime = 1;
+ cred->po->np->dn_set_mtime = 1;
if (cred->mapped->accessed)
- cred->po->ip->dn_set_atime = 1;
+ cred->po->np->dn_set_atime = 1;
}
cred->mapped->written = 0;
cred->mapped->accessed = 0;
diff --git a/libdiskfs/conch-set.c b/libdiskfs/conch-set.c
index 5110096b..78af7750 100644
--- a/libdiskfs/conch-set.c
+++ b/libdiskfs/conch-set.c
@@ -30,7 +30,7 @@ ioserver_put_shared_data (void *arg)
cred->mapped->append_mode = (cred->po->openstat & O_APPEND);
cred->mapped->eof_notify = 0;
- cred->mapped->do_sigio = 0;
+ cred->mapped->do_sigio = (cred->po->openstat & O_FSYNC);
cred->mapped->use_file_size = 1;
cred->mapped->use_read_size = 0;
cred->mapped->optimal_transfer_size = cred->po->np->dn_stat.st_blksize;
diff --git a/libdiskfs/dir-chg.c b/libdiskfs/dir-chg.c
index 4c79fa27..d5823379 100644
--- a/libdiskfs/dir-chg.c
+++ b/libdiskfs/dir-chg.c
@@ -17,7 +17,7 @@
#include "priv.h"
#include "fs_S.h"
-#include "msg.h"
+#include "ourmsg_U.h"
kern_return_t
diskfs_S_dir_notice_changes (struct protid *cred,
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index 4b23228f..926b0ced 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -37,6 +37,9 @@ struct trans_link
from the child filesystem. */
struct condition initwait;
+ /* Lock of this structure's contents */
+ struct mutex lock;
+
/* This indicates that someone has already started up the translator */
int starting;
@@ -70,12 +73,10 @@ void fshelp_set_control (struct trans_link *link, mach_port_t ctl);
and will be provided as the cwdir of the process. NODE should
refer to the node being translated, and will be provided as the
realnode return value from fsys_startup. UID and GID are the uid
- and gid of the process to be started. LOCK must be a mutex which
- you hold; it is assumed that the trans_link structure will not be
- changed unless this is held. */
+ and gid of the process to be started. */
error_t fshelp_start_translator (struct trans_link *link, char *name,
int namelen, file_t dir, file_t node,
- uid_t uid, gid_t gid, struct mutex *lock);
+ uid_t uid, gid_t gid);
/* Call this when you receive a fsys_startup message on a port of type
fshelp_transboot_port_type. PORTSTRUCT is the result of
diff --git a/libiohelp/iohelp.h b/libiohelp/iohelp.h
index 4abf3716..b816a50e 100644
--- a/libiohelp/iohelp.h
+++ b/libiohelp/iohelp.h
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include _HURD_IOSERVER_
+#ifndef _HURD_IOSERVER_
#define _HURD_IOSERVER_
#include <mach.h>