From patchwork Tue Sep 3 12:11:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 2853205 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C40159F3DC for ; Tue, 3 Sep 2013 12:11:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C19C62012D for ; Tue, 3 Sep 2013 12:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E57F0200C5 for ; Tue, 3 Sep 2013 12:11:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932740Ab3ICML3 (ORCPT ); Tue, 3 Sep 2013 08:11:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60214 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760040Ab3ICML2 (ORCPT ); Tue, 3 Sep 2013 08:11:28 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D4C47A51B7; Tue, 3 Sep 2013 14:11:27 +0200 (CEST) Received: by ds.suse.cz (Postfix, from userid 10065) id 58B29DA7E6; Tue, 3 Sep 2013 14:11:27 +0200 (CEST) From: David Sterba To: linux-fsdevel@vger.kernel.org Cc: David Sterba , linux-btrfs@vger.kernel.org, viro@zeniv.linux.org.uk Subject: [PATCH 3/3] btrfs: set FIEMAP_EXTENT_DATA_COMPRESSED for compressed extents Date: Tue, 3 Sep 2013 14:11:06 +0200 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Set the EXTENT_DATA_COMPRESSED flag together with EXTENT_ENCODED as defined by fiemap spec. Signed-off-by: David Sterba --- fs/btrfs/extent_io.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fe443fe..bb2e346 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4095,8 +4095,10 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, } else { disko = em->block_start + offset_in_extent; } - if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) + if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) { flags |= FIEMAP_EXTENT_ENCODED; + flags |= FIEMAP_EXTENT_DATA_COMPRESSED; + } free_extent_map(em); em = NULL;