LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@openedhand.com> To: dedekind@infradead.org Cc: linux-mtd <linux-mtd@lists.infradead.org>, LKML <linux-kernel@vger.kernel.org> Subject: Re: [PATCH/RFC] oops and panic message logging to MTD Date: Tue, 19 Jun 2007 11:52:29 +0100 [thread overview] Message-ID: <1182250350.5760.42.camel@localhost.localdomain> (raw) In-Reply-To: <1182248962.4403.60.camel@sauron> On Tue, 2007-06-19 at 13:29 +0300, Artem Bityutskiy wrote: > On Tue, 2007-06-19 at 11:00 +0100, Richard Purdie wrote: > > > Well, mtd->block_isbad() may return error, unlikely, bu still. You also > > > ignore the error at other places. > > > > Ignoring that is deliberate since it doesn't really matter if the block > > is bad or we can't read from it, the action is the same... > > No, bad EB is a perfectly legal thing and you should deal with it. The code does. > Error > code means that something very bad and sever is going on and you have to > just refuse working with this device. In this case, it will just move on to the next EB. There is code to handle no available EBs at which point it will refuse to work with the device. > > > Also, do not ignore error code of mtd->block_markbad() > > > > All we can do is print a warning, the action will be the same... > > No, the action should be returning an error and refuse doing more work. It will refuse to do more work if no usable EB is available but it will try others first. It can be assumed mtdoops will only be used with small partitions so trying to find a usable EB before giving a fatal error shouldn't have much of an impact on the system and might just let it keep working in some strange error cases (and since its an error logger, that is good). > > > Also, could you please use wait_event_interruptible() instead of > > > set_current_state() which looks better (indeed, you have wait queue, > > > so use wq calls). > > > > That piece of code is in keeping with the rest of the mtd erase handling > > code. Looking through the various wq macros, I don't see any which help > > particularly in this case... > > Well, it is matter of taste so I do not insist. But I think > wait_event_interruptible() is much nicer. Glance at drivers/ubi/io.c how > it looks. I'll have a look. Cheers, Richard
next prev parent reply other threads:[~2007-06-19 10:52 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-06-18 16:31 [PATCH/RFC] oops and panic message logging to MTD Richard Purdie 2007-06-19 7:55 ` Artem Bityutskiy 2007-06-19 10:00 ` Richard Purdie 2007-06-19 10:29 ` Artem Bityutskiy 2007-06-19 10:52 ` Richard Purdie [this message] 2007-06-19 11:05 ` Artem Bityutskiy 2007-07-03 9:47 ` Jarkko Lavinen 2007-07-04 8:54 ` Richard Purdie 2007-06-19 8:07 ` Artem Bityutskiy
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=1182250350.5760.42.camel@localhost.localdomain \ --to=rpurdie@openedhand.com \ --cc=dedekind@infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ /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: linkBe 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).