From patchwork Thu Apr 4 10:18:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Czerner X-Patchwork-Id: 233701 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D71E12C00A2 for ; Thu, 4 Apr 2013 21:18:12 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758054Ab3DDKSL (ORCPT ); Thu, 4 Apr 2013 06:18:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20478 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757032Ab3DDKSL (ORCPT ); Thu, 4 Apr 2013 06:18:11 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r34AI9YP013119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Apr 2013 06:18:09 -0400 Received: from localhost.localdomain.com (vpn1-6-47.ams2.redhat.com [10.36.6.47]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r34AI7WS015729; Thu, 4 Apr 2013 06:18:08 -0400 From: Lukas Czerner To: linux-ext4@vger.kernel.org Cc: tytso@mit.edu, Lukas Czerner Subject: [PATCH] ext4: Do not convert to indirect with bigalloc enabled Date: Thu, 4 Apr 2013 12:18:05 +0200 Message-Id: <1365070685-5088-1-git-send-email-lczerner@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org With bigalloc feature enabled we do not support indirect addressing at all so we have to prevent extent addressing to indirect addressing conversion in this case. The problem has been introduced with the commit "ext4: support simple conversion of extent-mapped inodes to use i_blocks" Signed-off-by: Lukas Czerner Reviewed-by: Zheng Liu --- fs/ext4/extents.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 6c5a70a..ddb6628 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4735,6 +4735,10 @@ int ext4_ind_migrate(struct inode *inode) (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) return -EINVAL; + if (EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb, + EXT4_FEATURE_RO_COMPAT_BIGALLOC)) + return -EOPNOTSUPP; + down_write(&EXT4_I(inode)->i_data_sem); ret = ext4_ext_check_inode(inode); if (ret)