* Mark buffers created via write() B_NOTMETA if hammer's double buffer
mode is enabled. When both the hammer double buffer mode and swapcache
is enabled this will cause the system to re-read the file from disk
once (via the block device) before attempting to swapcache it.
lwkt_gettoken(&hmp->fs_token);
/*
+ * Disallow swapcache operation on the vnode buffer if double
+ * buffering is enabled, the swapcache will get the data via
+ * the block device buffer.
+ */
+ if (hammer_double_buffer)
+ bp->b_flags |= B_NOTMETA;
+
+ /*
* Interlock with inode destruction (no in-kernel or directory
* topology visibility). If we queue new IO while trying to
* destroy the inode we can deadlock the vtrunc call in