Index: sys/fs/ext2fs/ext2_bmap.c =================================================================== --- sys/fs/ext2fs/ext2_bmap.c (revision 294313) +++ sys/fs/ext2fs/ext2_bmap.c (working copy) @@ -112,10 +112,10 @@ if (path.ep_is_sparse) { *bnp = -1; if (runp != NULL) - *runp = path.ep_sparse_ext.e_len - - (lbn - path.ep_sparse_ext.e_blk) - 1; + *runp = path.ep_extents.ep_sparse_ext.e_len - + (lbn - path.ep_extents.ep_sparse_ext.e_blk) - 1; } else { - ep = path.ep_ext; + ep = path.ep_extents.ep_ext; if (ep == NULL) ret = EIO; else { Index: sys/fs/ext2fs/ext2_extents.c =================================================================== --- sys/fs/ext2fs/ext2_extents.c (revision 294313) +++ sys/fs/ext2fs/ext2_extents.c (working copy) @@ -83,22 +83,22 @@ } if (l == first) { - path->ep_sparse_ext.e_blk = lbn; - path->ep_sparse_ext.e_len = first->e_blk - lbn; - path->ep_sparse_ext.e_start_hi = 0; - path->ep_sparse_ext.e_start_lo = 0; + path->ep_extents.ep_sparse_ext.e_blk = lbn; + path->ep_extents.ep_sparse_ext.e_len = first->e_blk - lbn; + path->ep_extents.ep_sparse_ext.e_start_hi = 0; + path->ep_extents.ep_sparse_ext.e_start_lo = 0; path->ep_is_sparse = 1; return; } - path->ep_ext = l - 1; - if (path->ep_ext->e_blk + path->ep_ext->e_len <= lbn) { - path->ep_sparse_ext.e_blk = lbn; + path->ep_extents.ep_ext = l - 1; + if (path->ep_extents.ep_ext->e_blk + path->ep_extents.ep_ext->e_len <= lbn) { + path->ep_extents.ep_sparse_ext.e_blk = lbn; if (l <= (first + ehp->eh_ecount - 1)) - path->ep_sparse_ext.e_len = l->e_blk - lbn; + path->ep_extents.ep_sparse_ext.e_len = l->e_blk - lbn; else // XXX: where does it end? - path->ep_sparse_ext.e_len = 1; - path->ep_sparse_ext.e_start_hi = 0; - path->ep_sparse_ext.e_start_lo = 0; + path->ep_extents.ep_sparse_ext.e_len = 1; + path->ep_extents.ep_sparse_ext.e_start_hi = 0; + path->ep_extents.ep_sparse_ext.e_start_lo = 0; path->ep_is_sparse = 1; } } @@ -165,7 +165,7 @@ for (i = ehp->eh_depth; i != 0; --i) { ext4_ext_binsearch_index(ip, path, lbn); path->ep_depth = 0; - path->ep_ext = NULL; + path->ep_extents.ep_ext = NULL; nblk = (daddr_t)path->ep_index->ei_leaf_hi << 32 | path->ep_index->ei_leaf_lo; @@ -186,7 +186,7 @@ } path->ep_depth = i; - path->ep_ext = NULL; + path->ep_extents.ep_ext = NULL; path->ep_index = NULL; path->ep_is_sparse = 0; Index: sys/fs/ext2fs/ext2_extents.h =================================================================== --- sys/fs/ext2fs/ext2_extents.h (revision 294313) +++ sys/fs/ext2fs/ext2_extents.h (working copy) @@ -88,7 +88,7 @@ union { struct ext4_extent ep_sparse_ext; struct ext4_extent *ep_ext; - }; + } ep_extents; struct ext4_extent_index *ep_index; struct ext4_extent_header *ep_header; }; Index: sys/fs/ext2fs/ext2_subr.c =================================================================== --- sys/fs/ext2fs/ext2_subr.c (revision 294313) +++ sys/fs/ext2fs/ext2_subr.c (working copy) @@ -91,7 +91,7 @@ memset(&path, 0, sizeof(path)); if (ext4_ext_find_extent(fs, ip, lbn, &path) == NULL) goto normal; - ep = path.ep_ext; + ep = path.ep_extents.ep_ext; if (ep == NULL) goto normal; Index: sys/fs/ext2fs/ext2_vnops.c =================================================================== --- sys/fs/ext2fs/ext2_vnops.c (revision 294313) +++ sys/fs/ext2fs/ext2_vnops.c (working copy) @@ -1835,9 +1835,9 @@ case EXT4_EXT_CACHE_NO: ext4_ext_find_extent(fs, ip, lbn, &path); if (path.ep_is_sparse) - ep = &path.ep_sparse_ext; + ep = &path.ep_extents.ep_sparse_ext; else - ep = path.ep_ext; + ep = path.ep_extents.ep_ext; if (ep == NULL) return (EIO); @@ -1855,6 +1855,7 @@ case EXT4_EXT_CACHE_GAP: /* block has not been allocated yet */ + newblk = 0; /* Avoid compiler warning */ break; case EXT4_EXT_CACHE_IN: