+#if 0
+ /* Start fetches on any data blocks that we will need for this read. */
+ BlueSkyStoreAsync *barrier = bluesky_store_async_new(inode->fs->store);
+ barrier->op = STORE_OP_BARRIER;
+ uint64_t start_block, end_block;
+ start_block = offset / BLUESKY_BLOCK_SIZE;
+ end_block = (offset + len - 1) / BLUESKY_BLOCK_SIZE;
+ if (bluesky_verbose) {
+ g_log("bluesky/file", G_LOG_LEVEL_DEBUG,
+ "Start prefetch on blocks %"PRIi64" .. %"PRIi64,
+ start_block, end_block);
+ }
+ for (uint64_t i = start_block; i <= end_block; i++) {
+ BlueSkyBlock *b = &g_array_index(inode->blocks, BlueSkyBlock,
+ i);
+ if (b->type == BLUESKY_BLOCK_REF)
+ bluesky_block_fetch(inode, b, barrier);
+ }
+ bluesky_store_async_submit(barrier);
+ bluesky_store_async_wait(barrier);
+ bluesky_store_async_unref(barrier);
+ if (bluesky_verbose) {
+ g_log("bluesky/file", G_LOG_LEVEL_DEBUG, "Prefetch complete.");
+ }
+#endif
+