linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: srimugunthan dhandapani <srimugunthan.dhandapani@gmail.com>
Cc: linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org
Subject: Re: logfs unmount bug
Date: Thu, 1 Sep 2011 23:34:20 +0200	[thread overview]
Message-ID: <20110901213420.GA30947@logfs.org> (raw)
In-Reply-To: <CAMjNe_d0-vz==Hjqzyu6taJHyHiPff8EH+=qadrOv_87LO8F2g@mail.gmail.com>

On Thu, 1 September 2011 11:38:39 +0530, srimugunthan dhandapani wrote:
> 
> Its frustrating when you ask me to take a new set of logs without
> reading my previous mails.
> To repeat, iam not able to reproduce the third bug. I think the first
> two bugs should be reproducible at your end.

Well, so far I have basically ignored your second and third bug.  As
long as the first is unresolved, I don't want to add yet more
confusion to what we already have.

> I thought that you were asking me to take the logs because you are not
> able to reproduce them too.

I wanted to ask you to take the test patch, run it, see the debug
output in the kernel log and send it to me.  "Take the logs" may have
been what I said, but if I did that would have been too ambiguous.  A
single line of output from the debug printk would have been enough, or
maybe a pagefull.  Certainly not megabytes worth.

> Out of curiosity, are you able to run bonnie successfully with logfs+nandsim?

Yes and no.  I think I have to apologize for using block2mtd so far.
There shouldn't be a big difference between one mtd driver and another
wrt. logfs behaviour.  Famous last words.

The problem with nandsim + logfs is the default segment size.  16k is
not enough to fit an entire journal commit into.  You can try this
yourself by using "mklogfs -s14 /dev/mtd0" or "mklogfs -s15 /dev/mtd0"
in your test scripts.  The first should run into the infinite loop you
experienced, while the second should work.

I'm not entirely sure what to do about this.  The easiest and probably
most robust solution is to check for segment size at mount time and
fail for anything <32k.

Oh, and you might want to add the patch below.

Jörn

-- 
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918

[PATCH] logfs: add mtd_write_sb

Fairly obvious, given the benefit of hindsight. :(

Signed-off-by: Joern Engel <joern@logfs.org>
---
 fs/logfs/dev_mtd.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c
index 5ca422c..50a3c8c 100644
--- a/fs/logfs/dev_mtd.c
+++ b/fs/logfs/dev_mtd.c
@@ -228,6 +228,15 @@ static void mtd_writeseg(struct super_block *sb, u64 ofs, size_t len)
 	__mtd_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT);
 }
 
+static int mtd_write_sb(struct super_block *sb, struct page *page)
+{
+	struct mtd_info *mtd = logfs_super(sb)->s_mtd;
+
+	if (mtd->sync)
+		mtd->sync(mtd);
+	return 0;
+}
+
 static void mtd_put_device(struct logfs_super *s)
 {
 	put_mtd_device(s->s_mtd);
@@ -255,6 +264,7 @@ out:
 static const struct logfs_device_ops mtd_devops = {
 	.find_first_sb	= mtd_find_first_sb,
 	.find_last_sb	= mtd_find_last_sb,
+	.write_sb	= mtd_write_sb,
 	.readpage	= mtd_readpage,
 	.writeseg	= mtd_writeseg,
 	.erase		= mtd_erase,
-- 
1.7.2.3
--
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

      parent reply	other threads:[~2011-09-01 21:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 19:35 logfs unmount bug srimugunthan dhandapani
2011-08-05 16:03 ` Jörn Engel
2011-08-06 14:09   ` srimugunthan dhandapani
2011-08-08  8:31     ` Jörn Engel
2011-08-08 14:44       ` srimugunthan dhandapani
2011-08-09 14:58         ` Jörn Engel
2011-08-10 11:06           ` srimugunthan dhandapani
2011-08-12  9:34             ` Jörn Engel
2011-08-12 17:26               ` srimugunthan dhandapani
2011-08-16 17:17                 ` Jörn Engel
2011-08-21 21:19                   ` srimugunthan dhandapani
2011-08-26 19:49                     ` Jörn Engel
2011-08-29 10:07                       ` srimugunthan dhandapani
2011-08-31  5:58                         ` Jörn Engel
2011-08-31  7:22                           ` srimugunthan dhandapani
2011-08-31  7:49                             ` Jörn Engel
2011-08-31 12:49                               ` srimugunthan dhandapani
2011-08-31 14:17                                 ` Jörn Engel
2011-09-01  6:08                                   ` srimugunthan dhandapani
2011-09-01  9:46                                     ` srimugunthan dhandapani
2011-09-01 21:34                                     ` Jörn Engel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110901213420.GA30947@logfs.org \
    --to=joern@logfs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=srimugunthan.dhandapani@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).