fix
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 16 Aug 2004 13:29:11 +0000 (13:29 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 16 Aug 2004 13:29:11 +0000 (13:29 +0000)
ChangeLog
Filesystems
kernel/dev.c
kernel/file.c
kernel/fuse_i.h

index 085a01fe22170439a85e1c3324ae1009fe8d09ea..fb0030abc784de5a23314838b901966b51db8f16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-08-16  Miklos Szeredi <miklos@szeredi.hu>
+
+       * Change release method to be non-interruptible.  Fixes bug
+       causing missing release() call when program which has opened files
+       is killed (reported by Franco Broi and David Shaw)
 2004-07-29  Miklos Szeredi <miklos@szeredi.hu>
 
        * Add fuse_invalidate() to library API
index eecf82e70bc88a86a4267a0642fde4d6e307b1f1..ced45decac16187317e9604f66d3374c1fa54b31 100644 (file)
@@ -171,3 +171,17 @@ Description:
   as WebDAV API.
 
 ==============================================================================
+Name: RelFS
+
+Author: Vincenzo Ciancia <vincenzo_ml (at) yahoo (dot) it>
+
+Homepage: http://relfs.sourceforge.net/
+
+Description:
+
+  This is a linux userspace filesystem using fuse and a relational
+  database to store information about files. Special directories can
+  represent views on the database, and many powerful features, such as
+  bayesian classification, are added through plugins.
+
+==============================================================================
index 07c19ee72dca170fe1d3a7b1bbeaa17059cab36b..31b76a6064546769f156b9afb106a91d227ae6bf 100644 (file)
@@ -62,12 +62,17 @@ static int request_restartable(enum fuse_opcode opcode)
 }
 
 /* Called with fuse_lock held.  Releases, and then reaquires it. */
-static void request_wait_answer(struct fuse_req *req)
+static void request_wait_answer(struct fuse_req *req, int interruptible)
 {
        int intr;
        
        spin_unlock(&fuse_lock);
-       intr = wait_event_interruptible(req->waitq, req->finished);
+       if (interruptible)
+               intr = wait_event_interruptible(req->waitq, req->finished);
+       else {
+               wait_event(req->waitq, req->finished);
+               intr = 0;
+       }
        spin_lock(&fuse_lock);
        if (!intr)
                return;
@@ -171,7 +176,8 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req)
        }
 }
 
-void request_send(struct fuse_conn *fc, struct fuse_req *req)
+static void __request_send(struct fuse_conn *fc, struct fuse_req *req,
+                          int interruptible)
 {
        req->issync = 1;
        req->end = NULL;
@@ -182,12 +188,22 @@ void request_send(struct fuse_conn *fc, struct fuse_req *req)
                req->in.h.unique = get_unique(fc);              
                list_add_tail(&req->list, &fc->pending);
                wake_up(&fc->waitq);
-               request_wait_answer(req);
+               request_wait_answer(req, interruptible);
                list_del(&req->list);
        }
        spin_unlock(&fuse_lock);
 }
 
+void request_send(struct fuse_conn *fc, struct fuse_req *req)
+{
+       __request_send(fc, req, 1);
+}
+
+void request_send_nonint(struct fuse_conn *fc, struct fuse_req *req)
+{
+       __request_send(fc, req, 0);
+}
+
 void request_send_noreply(struct fuse_conn *fc, struct fuse_req *req)
 {
        req->issync = 0;
index facd36cda3510d0de421ad19bbf76542c776decf..18c155e25b9dd98bdae672f493830a5c0c7b9c10 100644 (file)
@@ -144,7 +144,7 @@ static int fuse_release(struct inode *inode, struct file *file)
        req->in.numargs = 1;
        req->in.args[0].size = sizeof(struct fuse_release_in);
        req->in.args[0].value = inarg;
-       request_send(fc, req);
+       request_send_nonint(fc, req);
        fuse_put_request(fc, req);
        kfree(ff);
        up(&inode->i_sem);
index c1211489aae4824932496af023df13e51ccd894e..d92e7954792355f3e35bd2c22795f8887c554f71 100644 (file)
@@ -347,6 +347,11 @@ void fuse_put_request(struct fuse_conn *fc, struct fuse_req *req);
  */
 void request_send(struct fuse_conn *fc, struct fuse_req *req);
 
+/**
+ * Send a non-interruptible request
+ */
+void request_send_nonint(struct fuse_conn *fc, struct fuse_req *req);
+
 /**
  * Send a request for which a reply is not expected
  */