From patchwork Wed Aug 31 07:22:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: srimugunthan dhandapani X-Patchwork-Id: 112450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6A532B6F83 for ; Wed, 31 Aug 2011 17:23:10 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qyf8W-0001lO-T2; Wed, 31 Aug 2011 07:23:01 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qyf8W-0000Tf-Dy; Wed, 31 Aug 2011 07:23:00 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qyf8S-0000TK-PG for linux-mtd@lists.infradead.org; Wed, 31 Aug 2011 07:22:57 +0000 Received: by iacb35 with SMTP id b35so573612iac.36 for ; Wed, 31 Aug 2011 00:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=OLXVE8D+vo2nWNYqkcE1MVTOynmhWhx4TXFdFKCk5bk=; b=IaHu5ACAEmDfADatbXOmW+lqd3b1IDuX2yUeUdu3jLBmYKjM8Ohv1M1n7+Zqj1FYQt yM/dhpYqWg8KVaLJAnqt0w0CyEycuhOk3+NVSABRO2pG2Reh9Gj5wkhzcaxNkbhtCuJo HXRHKnM2TNFv72fNzIwJztS8qoCO5jWxeMgso= MIME-Version: 1.0 Received: by 10.42.80.84 with SMTP id u20mr94729ick.39.1314775374208; Wed, 31 Aug 2011 00:22:54 -0700 (PDT) Received: by 10.42.108.4 with HTTP; Wed, 31 Aug 2011 00:22:54 -0700 (PDT) In-Reply-To: <20110831055854.GA12713@logfs.org> References: <20110808083107.GN26160@logfs.org> <20110809145812.GR26160@logfs.org> <20110812093429.GS26160@logfs.org> <20110816171707.GU26160@logfs.org> <20110826194910.GE22411@logfs.org> <20110831055854.GA12713@logfs.org> Date: Wed, 31 Aug 2011 12:52:54 +0530 Message-ID: Subject: Re: logfs unmount bug From: srimugunthan dhandapani To: =?ISO-8859-1?Q?J=F6rn_Engel?= X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110831_032256_940539_DDFB5848 X-CRM114-Status: GOOD ( 14.63 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (srimugunthan.dhandapani[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Wed, Aug 31, 2011 at 11:28 AM, Jörn Engel wrote: > I can do.  Can you ensure you have my patch applied, rerun the rest > case and send me the kernel results? I applied your patch1 and the bonnie output is the same(stuck at "Creating files in sequential order ..."). The kernel is from your git directory(http://git.kernel.org/?p=linux/kernel/git/joern/logfs.git;a=summary) I am pretty sure i applied the patch. The git diff output is below[1] The kernel log is at https://docs.google.com/leaf?id=0BycgLWCW61phNjY0ZDg4ZjUtYzAyMy00YTgwLWFlMmItNjlmZWIzMWFlNGUy&hl=en_US While i still have your attention, i would like to point out at max writepage size restriction in logfs. Currently logfs has a max writepage size as 4K. Currently, large page nand flashes and MLC nand come in 8K page sizes. As the usecase for logfs is large nand flashes(mostly with parallel and DMA write capabilities), it may be essential to remove the 4K write page size restriction. I was only able to change the logfs-tools for >4K writepage size. If you send a patch, that makes logfs useable for writepagesize >4K, i can try on real hardware, instead of nandsim and give you the results :-) [1] Thanks, mugunthan diff --git a/fs/logfs/file.c b/fs/logfs/file.c index c2ad702..ee3c76a 100644 --- a/fs/logfs/file.c +++ b/fs/logfs/file.c @@ -158,7 +158,6 @@ static int logfs_writepage(struct page *page, struct writeba zero_user_segment(page, offset, PAGE_CACHE_SIZE); return __logfs_writepage(page); } - static void logfs_invalidatepage(struct page *page, unsigned long offset) { struct logfs_block *block = logfs_block(page); @@ -166,12 +165,24 @@ static void logfs_invalidatepage(struct page *page, unsign if (block->reserved_bytes) { struct super_block *sb = page->mapping->host->i_sb; struct logfs_super *super = logfs_super(sb); - super->s_dirty_pages -= block->reserved_bytes; - block->ops->free_block(sb, block); - BUG_ON(bitmap_weight(block->alias_map, LOGFS_BLOCK_FACTOR)); + // block->ops->free_block(sb, block); + // BUG_ON(bitmap_weight(block->alias_map, LOGFS_BLOCK_FACTOR)); + if (bitmap_weight(block->alias_map, LOGFS_BLOCK_FACTOR)) + { + printk(KERN_DEBUG"logfs_invalidatepage(%lx, %x, %llx)\n" + page->mapping->host->i_ino, + page->mapping->host->i_nlink, + page->mapping->host->i_size); + move_page_to_btree(page); + } else + { + block->ops->free_block(sb, block); + } } else + { move_page_to_btree(page); + } BUG_ON(PagePrivate(page) || page->private); } diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h index 9e74902..24c19a6 100644 --- a/fs/logfs/logfs.h +++ b/fs/logfs/logfs.h @@ -35,7 +35,9 @@ #define LOGFS_DEBUG_BLOCKMOVE (0x0400) #define LOGFS_DEBUG_ALL (0xffffffff) -#define LOGFS_DEBUG (0x01) +//#define LOGFS_DEBUG (0x01) + +#define LOGFS_DEBUG LOGFS_DEBUG_ALL /* * To enable specific log messages, simply define LOGFS_DEBUG to match any * or all of the above.