From patchwork Tue Sep 30 08:35:33 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Akira Fujita X-Patchwork-Id: 2074 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.176.167]) by ozlabs.org (Postfix) with ESMTP id C448BDDDF4 for ; Tue, 30 Sep 2008 18:36:06 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbYI3IgF (ORCPT ); Tue, 30 Sep 2008 04:36:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751645AbYI3IgF (ORCPT ); Tue, 30 Sep 2008 04:36:05 -0400 Received: from TYO201.gate.nec.co.jp ([202.32.8.193]:33039 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751521AbYI3IgD (ORCPT ); Tue, 30 Sep 2008 04:36:03 -0400 Received: from mailgate3.nec.co.jp ([10.7.69.162]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m8U8ZbSH028424; Tue, 30 Sep 2008 17:35:37 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id m8U8ZbM20441; Tue, 30 Sep 2008 17:35:37 +0900 (JST) Received: from saigo.jp.nec.com (saigo.jp.nec.com [10.26.220.6]) by mailsv3.nec.co.jp (8.13.8/8.13.4) with ESMTP id m8U8ZaQm003929; Tue, 30 Sep 2008 17:35:36 +0900 (JST) Received: from [10.64.168.93] ([10.64.168.93] [10.64.168.93]) by mail.jp.nec.com with ESMTP; Tue, 30 Sep 2008 17:35:34 +0900 Message-ID: <48E1E4D5.7020706@rs.jp.nec.com> Date: Tue, 30 Sep 2008 17:35:33 +0900 From: Akira Fujita User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Theodore Tso , Mingming Cao , linux-ext4@vger.kernel.org Subject: [PATCH] ext4: Fix compile error at defrag.c in the current ext4 patch queue Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, The following compile error occurs at defrag.c in the current ext4 patch queue (2.6.27-rc6), because mballoc has become default and some functions related to the block allocation have been renamed. This patch fixes this inconsistency. Note: ext4_check_defrag() originally checks the length of extents in the force defrag (-f), but "defrag-10-add-ioc-move-victim-ioctl" in the ext4 patch queue is commented out, so that it just returns 0. I'll update ext4_check_defrag() correctly in the next version. CC fs/ext4/defrag.o fs/ext4/defrag.c: In function ‘ext4_defrag_check’: fs/ext4/defrag.c:1162: error: ‘EXT4_MOUNT_MBALLOC’ undeclared (first use in this function) fs/ext4/defrag.c:1162: error: (Each undeclared identifier is reported only once fs/ext4/defrag.c:1162: error: for each function it appears in.) fs/ext4/defrag.c: In function ‘ext4_defrag’: fs/ext4/defrag.c:1427: error: implicit declaration of function ‘ext4_mb_discard_inode_preallocations’ Signed-off-by: Akira Fujita --- fs/ext4/defrag.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext4/defrag.c b/fs/ext4/defrag.c index cb7d237..6364d10 100644 --- a/fs/ext4/defrag.c +++ b/fs/ext4/defrag.c @@ -1158,13 +1158,6 @@ static int ext4_defrag_check(struct inode *org_inode, ext4_lblk_t defrag_size, ext4_fsblk_t *goal) { - /* ext4 online defrag needs mballoc mount option. */ - if (!test_opt(org_inode->i_sb, MBALLOC)) { - printk(KERN_ERR "ext4 defrag: multiblock allocation " - "is disabled\n"); - return -EOPNOTSUPP; - } - return 0; } @@ -1424,7 +1417,7 @@ ext4_defrag(struct file *filp, ext4_lblk_t block_start, * When true ext4_mb_return_to_preallocation() is * implemented, this will be removed. */ - ext4_mb_discard_inode_preallocations(org_inode); + ext4_discard_preallocations(org_inode); while (org_page_offset <= seq_end_page) {