about summary refs log tree commit homepage
path: root/cmogstored.h
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-12-24 08:50:34 +0000
committerEric Wong <e@80x24.org>2016-12-24 08:50:34 +0000
commit1333a3de16d7a9192286195da241ef195dbc556a (patch)
treeca8f4e452d6df07a5233b6b703b7a0ba17c72220 /cmogstored.h
parenteb41c7abde797e03dd51c0bc945f0298d0fe235c (diff)
downloadcmogstored-1333a3de16d7a9192286195da241ef195dbc556a.tar.gz
Let's not forget about this queue, it is a useful design.
Diffstat (limited to 'cmogstored.h')
-rw-r--r--cmogstored.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmogstored.h b/cmogstored.h
index f5c682e..db87ac0 100644
--- a/cmogstored.h
+++ b/cmogstored.h
@@ -99,18 +99,18 @@ enum mog_next {
 struct mog_ioq {
         unsigned cur;
         unsigned max;
-        pthread_mutex_t mtx;
+        pthread_mutex_t mtx; /* protects cur, max, ioq_head */
         SIMPLEQ_HEAD(ioq_head, mog_fd) ioq_head;
-        bool contended;
-        struct mog_svc *svc;
+        bool contended; /* hint, not protected */
+        struct mog_svc *svc; /* initialized once at creation */
 };
 
 struct mog_wbuf;
 struct mog_dev {
         dev_t st_dev;
         uint32_t devid;
-        struct mog_ioq ioq;
-        struct mog_ioq fsckq;
+        struct mog_ioq ioq; /* normal requests */
+        struct mog_ioq fsckq; /* low-priority for MogileFS fsck */
 };
 
 struct mog_rbuf {