diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index f05fcc67efa6fe4a5f43013d18480a1feea29faf..a2a84e266d371fb6868d632d75068bc8b3c18044 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4448,7 +4448,10 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans, len = btrfs_file_extent_inline_len(leaf, path->slots[0], extent); - ASSERT(len == i_size); + ASSERT(len == i_size || + (len == fs_info->sectorsize && + btrfs_file_extent_compression(leaf, extent) != + BTRFS_COMPRESS_NONE)); return 0; }