summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-06-27 19:19:13 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-06-27 19:19:13 +0000
commit0100a6e5bea180aa938ad618d7ed853dd0b7ed10 (patch)
treefd7f58e3f4eea5a4bfad0509dad6619fc01a54f5 /libdiskfs
parent38a8adf4ff9c0ecfbb4adb432feeff58e5058180 (diff)
hurd/
2002-06-26 Marcus Brinkmann <marcus@gnu.org> * fs_notify.defs: Add MsgOption for send timeout. (dir_changed): Changed to simpleroutine. Change type of first argument to fs_notify_t. Add TICKNO argument. (file_changed): Likewise. * hurd_types.defs (fs_notify_t): New type. * hurd_types.h (fs_notify_t): Likewise. libdiskfs/ 2002-06-26 Marcus Brinkmann <marcus@gnu.org> * Makefile (DIST_FILES): Variable removed. (MIGSTUBS): Use fs_notifyUser.o, not ourfs_notifyUser.o. * ourfs_notify.defs: File removed. * diskfs.h (struct node): New members DIRMOD_TICK and FILEMOD_TICK. * node-make.c (diskfs_make_node): Initialize DIRMOD_TICK and FILEMOD_TICK. * dir-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h". (diskfs_S_dir_notice_changes): Use new dir_changed invocation instead nowait_dir_changed. (diskfs_notice_dirchange): Likewise. Increase tick number. Ignore send timeout error. * file-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h". (diskfs_S_file_notice_changes): Use new file_changed invocation instead nowait_file_changed. (diskfs_notice_filechange): Likewise. Increase tick number. Ignore send timeout error. console/ 2002-06-27 Marcus Brinkmann <marcus@gnu.org> * Makefile (MIGSTUBS): Add fs_notifyUser.o. (MIGSFLAGS): New variable. * console.c: Include "fs_notify_U.h". (struct modreq): New structure. (struct cons): New members DIRMOD_REQS and DIRMOD_TICK. (cons_notice_dirchange): New function. (vcons_lookup): Call cons_notice_dirchange. (netfs_S_dir_notice_changes): New function. (main): Initialize new members in CONS. * display.c (nowait_file_changed): Update to new interface (new argument TICKNO). (do_mach_notify_msg_accepted): Call nowait_file_changed with new argument. (display_notice_changes): Likewise. (display_notice_filechange): Likewise.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/ChangeLog20
-rw-r--r--libdiskfs/Makefile3
-rw-r--r--libdiskfs/dir-chg.c12
-rw-r--r--libdiskfs/diskfs.h2
-rw-r--r--libdiskfs/file-chg.c14
-rw-r--r--libdiskfs/node-make.c2
-rw-r--r--libdiskfs/ourfs_notify.defs5
7 files changed, 40 insertions, 18 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog
index 6d30f75c..27879c7c 100644
--- a/libdiskfs/ChangeLog
+++ b/libdiskfs/ChangeLog
@@ -1,3 +1,23 @@
+2002-06-26 Marcus Brinkmann <marcus@gnu.org>
+
+ * Makefile (DIST_FILES): Variable removed.
+ (MIGSTUBS): Use fs_notifyUser.o, not ourfs_notifyUser.o.
+ * ourfs_notify.defs: File removed.
+ * diskfs.h (struct node): New members DIRMOD_TICK and
+ FILEMOD_TICK.
+ * node-make.c (diskfs_make_node): Initialize DIRMOD_TICK and
+ FILEMOD_TICK.
+ * dir-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h".
+ (diskfs_S_dir_notice_changes): Use new dir_changed invocation
+ instead nowait_dir_changed.
+ (diskfs_notice_dirchange): Likewise. Increase tick number.
+ Ignore send timeout error.
+ * file-chg.c: Include "fs_notify_U.h" instead "ourfs_notify_U.h".
+ (diskfs_S_file_notice_changes): Use new file_changed invocation
+ instead nowait_file_changed.
+ (diskfs_notice_filechange): Likewise. Increase tick number.
+ Ignore send timeout error.
+
2002-06-13 Roland McGrath <roland@frob.com>
* dir-readdir.c (diskfs_S_dir_readdir): Revert last change.
diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile
index 9785c29e..526cab7f 100644
--- a/libdiskfs/Makefile
+++ b/libdiskfs/Makefile
@@ -55,10 +55,9 @@ OTHERSRCS = conch-fetch.c conch-set.c dir-clear.c dir-init.c dir-renamed.c \
SRCS = $(OTHERSRCS) $(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(IFSOCKSRCS)
LCLHDRS = diskfs.h priv.h lithp.h fsmutations.h diskfs-pager.h fhandle.h
installhdrs = diskfs.h diskfs-pager.h
-DIST_FILES = ourfs_notify.defs
MIGSTUBS = fsServer.o ioServer.o fsysServer.o exec_startupServer.o \
- fsys_replyUser.o ourfs_notifyUser.o ifsockServer.o \
+ fsys_replyUser.o fs_notifyUser.o ifsockServer.o \
startup_notifyServer.o
OBJS = $(sort $(SRCS:.c=.o) $(MIGSTUBS))
diff --git a/libdiskfs/dir-chg.c b/libdiskfs/dir-chg.c
index 0e2f4c8a..7ca34447 100644
--- a/libdiskfs/dir-chg.c
+++ b/libdiskfs/dir-chg.c
@@ -17,7 +17,7 @@
#include "priv.h"
#include "fs_S.h"
-#include "ourfs_notify_U.h"
+#include "fs_notify_U.h"
kern_return_t
diskfs_S_dir_notice_changes (struct protid *cred,
@@ -37,7 +37,7 @@ diskfs_S_dir_notice_changes (struct protid *cred,
mutex_unlock (&np->lock);
return ENOTDIR;
}
- err = nowait_dir_changed (notify, DIR_CHANGED_NULL, "");
+ err = dir_changed (notify, np->dirmod_tick, DIR_CHANGED_NULL, "");
if (err)
{
mutex_unlock (&np->lock);
@@ -63,13 +63,15 @@ diskfs_notice_dirchange (struct node *dp, enum dir_changed_type type,
error_t err;
struct modreq **preq;
+ dp->dirmod_tick++;
preq = &dp->dirmod_reqs;
while (*preq)
{
struct modreq *req = *preq;
- err = nowait_dir_changed (req->port, type, name);
- if (err)
- { /* remove notify port */
+ err = dir_changed (req->port, dp->dirmod_tick, type, name);
+ if (err && err != MACH_SEND_TIMED_OUT)
+ {
+ /* Remove notify port. */
*preq = req->next;
mach_port_deallocate (mach_task_self (), req->port);
free (req);
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index c8c8b31a..70ce1e3f 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -101,8 +101,10 @@ struct node
struct conch conch;
struct modreq *dirmod_reqs;
+ unsigned int dirmod_tick;
struct modreq *filemod_reqs;
+ unsigned int filemod_tick;
loff_t allocsize;
diff --git a/libdiskfs/file-chg.c b/libdiskfs/file-chg.c
index e9535591..22edc69c 100644
--- a/libdiskfs/file-chg.c
+++ b/libdiskfs/file-chg.c
@@ -17,7 +17,7 @@
#include "priv.h"
#include "fs_S.h"
-#include "ourfs_notify_U.h"
+#include "fs_notify_U.h"
kern_return_t
diskfs_S_file_notice_changes (struct protid *cred, mach_port_t notify)
@@ -31,7 +31,7 @@ diskfs_S_file_notice_changes (struct protid *cred, mach_port_t notify)
np = cred->po->np;
mutex_lock (&np->lock);
- err = nowait_file_changed (notify, FILE_CHANGED_NULL, 0, 0);
+ err = file_changed (notify, np->filemod_tick, FILE_CHANGED_NULL, 0, 0);
if (err)
{
mutex_unlock (&np->lock);
@@ -51,14 +51,16 @@ diskfs_notice_filechange (struct node *dp, enum file_changed_type type,
{
error_t err;
struct modreq **preq;
-
+
+ dp->filemod_tick++;
preq = &dp->filemod_reqs;
while (*preq)
{
struct modreq *req = *preq;
- err = nowait_file_changed (req->port, type, start, end);
- if (err)
- { /* remove notify port */
+ err = file_changed (req->port, dp->filemod_tick, type, start, end);
+ if (err && err != MACH_SEND_TIMED_OUT)
+ {
+ /* Remove notify port. */
*preq = req->next;
mach_port_deallocate (mach_task_self (), req->port);
free (req);
diff --git a/libdiskfs/node-make.c b/libdiskfs/node-make.c
index 79c2890c..74fdda19 100644
--- a/libdiskfs/node-make.c
+++ b/libdiskfs/node-make.c
@@ -42,7 +42,9 @@ diskfs_make_node (struct disknode *dn)
np->sockaddr = MACH_PORT_NULL;
np->dirmod_reqs = 0;
+ np->dirmod_tick = 0;
np->filemod_reqs = 0;
+ np->filemod_tick = 0;
fshelp_transbox_init (&np->transbox, &np->lock, np);
iohelp_initialize_conch (&np->conch, &np->lock);
diff --git a/libdiskfs/ourfs_notify.defs b/libdiskfs/ourfs_notify.defs
deleted file mode 100644
index 64127fe6..00000000
--- a/libdiskfs/ourfs_notify.defs
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Private specialized presentation of fs_notify.defs for diskfs library. */
-
-#define routine simpleroutine
-#define USERPREFIX nowait_
-#include <hurd/fs_notify.defs>