From mboxrd@z Thu Jan 1 00:00:00 1970 From: srimugunthan dhandapani Subject: Re: logfs unmount bug Date: Wed, 31 Aug 2011 12:52:54 +0530 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org To: =?ISO-8859-1?Q?J=F6rn_Engel?= Return-path: Received: from mail-gx0-f174.google.com ([209.85.161.174]:42111 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754444Ab1HaHWz convert rfc822-to-8bit (ORCPT ); Wed, 31 Aug 2011 03:22:55 -0400 Received: by gxk21 with SMTP id 21so338569gxk.19 for ; Wed, 31 Aug 2011 00:22:54 -0700 (PDT) In-Reply-To: <20110831055854.GA12713@logfs.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Aug 31, 2011 at 11:28 AM, J=F6rn Engel wrote: > I can do. =A0Can 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=3Dlinux/kernel/git/joern/logfs.g= it;a=3Dsummary) 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=3D0BycgLWCW61phNjY0ZDg4ZjUtYzAyMy00YTg= wLWFlMmItNjlmZWIzMWFlNGUy&hl=3Den_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] 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, struc= t writeba zero_user_segment(page, offset, PAGE_CACHE_SIZE); return __logfs_writepage(page); } - static void logfs_invalidatepage(struct page *page, unsigned long offs= et) { struct logfs_block *block =3D logfs_block(page); @@ -166,12 +165,24 @@ static void logfs_invalidatepage(struct page *pag= e, unsign if (block->reserved_bytes) { struct super_block *sb =3D page->mapping->host->i_sb; struct logfs_super *super =3D logfs_super(sb); - super->s_dirty_pages -=3D block->reserved_bytes; - block->ops->free_block(sb, block); - BUG_ON(bitmap_weight(block->alias_map, LOGFS_BLOCK_FACT= OR)); + // block->ops->free_block(sb, block); + // BUG_ON(bitmap_weight(block->alias_map, LOGFS_BLOCK_FACT= OR)); + 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. Thanks, mugunthan -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html