Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision 377cce891a2528771a2913795413e5ee00e7911d)
+++ uspace/srv/fs/fat/fat_fat.c	(revision 746f623361c59a51651a1cf1c8af79224327a26a)
@@ -119,4 +119,53 @@
 
 	return EOK;
+}
+
+/** Read block from file located on a FAT file system.
+ *
+ * @param block		Pointer to a block pointer for storing result.
+ * @param bs		Buffer holding the boot sector of the file system.
+ * @param nodep		FAT node.
+ * @param bn		Block number.
+ * @param flags		Flags passed to libblock.
+ *
+ * @return		EOK on success or a negative error code.
+ */
+int
+fat_block_get(block_t **block, struct fat_bs *bs, fat_node_t *nodep,
+    aoff64_t bn, int flags)
+{
+	if (!nodep->size)
+		return ELIMIT;
+
+	if (((((nodep->size - 1) / bs->bps) / bs->spc) == bn / bs->spc) &&
+	    (nodep->lastc_cached_valid) && (nodep->firstc != FAT_CLST_ROOT)) {
+	    	/*
+		 * This is a request to read a block within the last cluster
+		 * when fortunately we have the last cluster number cached.
+		 */
+		fat_cluster_t lastc = nodep->lastc_cached_value;
+		unsigned bps;
+		unsigned rscnt;		/* block address of the first FAT */
+		unsigned rde;
+		unsigned rds;		/* root directory size */
+		unsigned sf;
+		unsigned ssa;		/* size of the system area */
+
+		bps = uint16_t_le2host(bs->bps);
+		rscnt = uint16_t_le2host(bs->rscnt);
+		rde = uint16_t_le2host(bs->root_ent_max);
+		sf = uint16_t_le2host(bs->sec_per_fat);
+
+		rds = (sizeof(fat_dentry_t) * rde) / bps;
+		rds += ((sizeof(fat_dentry_t) * rde) % bps != 0);
+		ssa = rscnt + bs->fatcnt * sf + rds;
+	
+		return block_get(block, nodep->idx->dev_handle,
+		    ssa + (lastc - FAT_CLST_FIRST) * bs->spc + bn % bs->spc,
+		    flags);
+	} else {
+		return _fat_block_get(block, bs, nodep->idx->dev_handle,
+		    nodep->firstc, bn, flags);
+	}
 }
 
Index: uspace/srv/fs/fat/fat_fat.h
===================================================================
--- uspace/srv/fs/fat/fat_fat.h	(revision 377cce891a2528771a2913795413e5ee00e7911d)
+++ uspace/srv/fs/fat/fat_fat.h	(revision 746f623361c59a51651a1cf1c8af79224327a26a)
@@ -64,8 +64,6 @@
     fat_cluster_t *, uint16_t *, uint16_t);
 
-#define fat_block_get(b, bs, np, bn, flags) \
-    _fat_block_get((b), (bs), (np)->idx->dev_handle, (np)->firstc, (bn), \
-    (flags))
-
+extern int fat_block_get(block_t **, struct fat_bs *, struct fat_node *,
+    aoff64_t, int);
 extern int _fat_block_get(block_t **, struct fat_bs *, dev_handle_t,
     fat_cluster_t, aoff64_t, int);
