fs: btrfs: support sparse extents

When logical address of a regular extent is 0, the extent is sparse and
consists of all zeros.

Without this when sparse extents are used in a file reading fails with
  Cannot map logical address 0 to physical

Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
diff --git a/fs/btrfs/extent-io.c b/fs/btrfs/extent-io.c
index 66d0e1c..2e4599c 100644
--- a/fs/btrfs/extent-io.c
+++ b/fs/btrfs/extent-io.c
@@ -78,6 +78,12 @@
 	if (size > dlen - offset)
 		size = dlen - offset;
 
+	/* sparse extent */
+	if (extent->disk_bytenr == 0) {
+		memset(out, 0, size);
+		return size;
+	}
+
 	physical = btrfs_map_logical_to_physical(extent->disk_bytenr);
 	if (physical == -1ULL)
 		return -1ULL;