From patchwork Sun Jul 1 13:48:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Liu X-Patchwork-Id: 168415 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 0B4862C01C0 for ; Sun, 1 Jul 2012 23:41:27 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932433Ab2GANlZ (ORCPT ); Sun, 1 Jul 2012 09:41:25 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:36672 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932428Ab2GANlY (ORCPT ); Sun, 1 Jul 2012 09:41:24 -0400 Received: by mail-pz0-f46.google.com with SMTP id y13so6319540dad.19 for ; Sun, 01 Jul 2012 06:41:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=vYt3xU0bRuF+AYOA0KR4iuhwgN9N8vGgBiqGzexEGh8=; b=uoZAAFtTtLOGsv9FJBdR4YcRMYa3+tnaQ5dbQkqtqmsl4NshtqD/O3VkMaznQ5lsyx 4D4dETyxWxNweWGHwEDN3hqaa9FpxwaSSpDMiDyhkJYF+EsSqLUA7nzXrlapLNMi/BQm 4FOT3CdPsmj05o2WuBach9+o0TkxPk01F1pSdqdWyDP+lwt+B+vALnTefj5ur0KeJVoX YXO3TBai9m+YjYwpREyon3VAi2ZczzBc8VXIncUWBzEWLurykCBImFuDs41PPgDkE22/ F7GIXiiZp2siuJD/KU7gowJlodVcL14pRVW3TV//SlVp/sJNgPu4OII9PqBcuGpZb3Gt /sAQ== Received: by 10.68.231.40 with SMTP id td8mr22743886pbc.150.1341150084421; Sun, 01 Jul 2012 06:41:24 -0700 (PDT) Received: from localhost.localdomain ([182.92.247.2]) by mx.google.com with ESMTPS id ql3sm10544254pbc.72.2012.07.01.06.41.22 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 01 Jul 2012 06:41:24 -0700 (PDT) From: Zheng Liu To: linux-ext4@vger.kernel.org Cc: Zheng Liu Subject: [PATCH 19/35 v3] debugfs: make rm and kill_file cmd support inline data Date: Sun, 1 Jul 2012 21:48:42 +0800 Message-Id: <1341150538-32047-20-git-send-email-wenqing.lz@taobao.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1341150538-32047-1-git-send-email-wenqing.lz@taobao.com> References: <1341150538-32047-1-git-send-email-wenqing.lz@taobao.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Zheng Liu rm and kill_file command don't need to release blocks. Signed-off-by: Zheng Liu --- debugfs/debugfs.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 87fc6a9..9069735 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -1851,8 +1851,9 @@ static void kill_file_by_inode(ext2_ino_t inode) if (!ext2fs_inode_has_valid_blocks2(current_fs, &inode_buf)) return; - ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, - release_blocks_proc, NULL); + if (!ext2fs_has_inline_data(current_fs, inode)) + ext2fs_block_iterate3(current_fs, inode, BLOCK_FLAG_READ_ONLY, + NULL, release_blocks_proc, NULL); printf("\n"); ext2fs_inode_alloc_stats2(current_fs, inode, -1, LINUX_S_ISDIR(inode_buf.i_mode));