                                                               :entry entry})))))
                        (aput-close scan-work res-ch (merge m {:status :ok}))))
                 nil)]
-       (kvs-do actx state-ch nil (kvs-checker (:kvs-ident m) cb)))))
+       (if kvs-snapshot
+         (kvs-snapshot-do actx res-ch kvs-snapshot (kvs-checker kvs-ident cb))
+         (kvs-do actx state-ch nil (kvs-checker kvs-ident cb))))))
 
 (def op-handlers
   {:kvs-open

  (act kvs-do actx
       (aput kvs-do state-ch [cb res-ch])))

(defn make-scan-fn [kc-kind scan-kind result-key get-entry]
  (fn [actx state-ch m]
     (let [{:keys [from to res-ch]} m
           cb (fn [state kvs]
                (act scan-work actx
                     (let [kc (kc-kind kvs)]

; - fsync
; - stats
; - has compaction/maintenance abstraction
;
; Note that we always close the res-ch.

; TODO: Track age, utilization, compaction for simulated performance.
; TODO: Readers not blocked by writers.
; TODO: Mutations shadow old values.

(defn make-kc [] ; A kc is a keys & changes map.
  {:keys (sorted-map)      ; key -> sq
