diff options
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/ChangeLog | 20 | ||||
-rw-r--r-- | libdiskfs/Makefile | 3 | ||||
-rw-r--r-- | libdiskfs/dir-chg.c | 12 | ||||
-rw-r--r-- | libdiskfs/diskfs.h | 2 | ||||
-rw-r--r-- | libdiskfs/file-chg.c | 14 | ||||
-rw-r--r-- | libdiskfs/node-make.c | 2 | ||||
-rw-r--r-- | libdiskfs/ourfs_notify.defs | 5 |
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> |