Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/include
In directory usw-pr-cvs1:/tmp/cvs-serv10467
Modified Files:
ntfsd.h
Log Message:
Extended ntfsd a bit to keep track of mounted volumes.
Index: ntfsd.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/ntfsd.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -U2 -r1.3 -r1.4
--- ntfsd.h 2001/04/07 13:47:55 1.3
+++ ntfsd.h 2001/04/07 14:46:14 1.4
@@ -26,5 +26,17 @@
#include <linux/bitops.h>
+#include <linux/spinlock.h>
+#include <asm/atomic.h>
+#include "volume.h"
+
+/*
+ * These keep track of all mounted volumes. Ntfsd needs to know so it can
+ * walk the dirty list for each mounted volume.
+ */
+extern ntfs_volume *mounted_volumes;
+extern int nr_mounted_volumes;
+extern spinlock_t mounted_volumes_lock;
+
/*
* We use a set of atomic flags for locking / access serialization. No need of
@@ -55,6 +67,8 @@
* ntfsd_start - start the writer daemon/thread
*
- * Start the writer deamon / thread. Currently implemented using an interval
- * timer and a handler for the SIGALRM signal.
+ * Start the writer daemon / thread. Currently implemented using an interval
+ * timer and a handler for the SIGALRM signal. This function can and should be
+ * called whenever you mount a volume, so that we know how many times you need
+ * to call ntfs_stop() before we actually stop the writer.
*
* Return TRUE on success or FALSE on error. In the latter case, errno contains
@@ -72,4 +86,6 @@
* ENOTSUP - The host system does not support SIGALRM signal. )-:
* EFAULT - Internal error. This is BAD.
+ * EMFILE - Ntfsd has been started too many times already. Cannot start
+ * again before at least one ntfsd_stop() call is issued.
* others - Other error codes returned by one of the system calls.
*/
@@ -79,6 +95,10 @@
* ntfsd_stop - stop the writer daemon/thread
*
- * Stop the writer deamon / thread. Currently implemented using an interval
- * timer and a handler for the SIGALRM signal.
+ * Stop the writer daemon / thread. Currently implemented using an interval
+ * timer and a handler for the SIGALRM signal. This functions should be called
+ * once for every umount performed. The daemon will only be stopped if
+ * ntfsd_stop() has been called the same number of times as ntfsd_start(), i.e.
+ * for every call to ntfsd_start(), you need to issue a corresponding
+ * ntfsd_stop().
*
* Return TRUE on success or FALSE on error. In the latter case, errno contains
|