Create a runtime option for sync/async frontend request handling.
[bluesky.git] / bluesky / bluesky.h
index 421d07d..7b8aad2 100644 (file)
@@ -29,6 +29,10 @@ typedef struct {
      * created in a pending state, and not unlocked until the data is actually
      * available.) */
     int sync_inode_fetches;
+
+    /* Should frontends handle requests serially or allow operations to proceed
+     * in parallel? */
+    int sync_frontends;
 } BlueSkyOptions;
 
 extern BlueSkyOptions bluesky_options;
@@ -134,6 +138,9 @@ bluesky_time_hires bluesky_now_hires();
  *     acquire locks on parents in the filesystem tree before children.
  *     (TODO: What about rename when we acquire locks in unrelated parts of the
  *     filesystem?)
+ *   - An inode should not be locked while the filesystem lock is already held,
+ *     since some code may do an inode lookup (which acquires the filesystem
+ *     lock) while a different inode is locked.
  * */
 typedef struct {
     GMutex *lock;