+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
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.
+
+==============================================================================
}
/* 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;
}
}
-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;
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;
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);
*/
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
*/