public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Vinit Agnihotri <vinit.agnihotri@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBI: Can we handle -EINTR differently in erase/write path???
Date: Fri, 13 Jul 2007 08:06:03 -0500	[thread overview]
Message-ID: <1184331963.6456.3.camel@weaponx.rchland.ibm.com> (raw)
In-Reply-To: <9b52d64c0707122307j419d2d98xa771c2c09a280164@mail.gmail.com>

On Fri, 2007-07-13 at 11:37 +0530, Vinit Agnihotri wrote:
> Hi heres few code snip from erase_worker(); from wl.c
> if (err != -EIO) {
>         /*
>          * If this is not %-EIO, we have no idea what to do. Scheduling
>          * this physical eraseblock for erasure again would cause
>          * errors again and again. Well, lets switch to RO mode.
>          */
>         ubi_ro_mode(ubi);
>         return err;
>     }
> 
> Suppose while erasure in progress & someone pressed "Ctrl+C" then UBI

This is the kernel...  the erase_worker function is called from a kernel
thread that doesn't allow signals.  How would it get a "Ctrl+C" event?

> This is my initial understanding about handling -EINTR, however I
> would like to know views of others. If all agrees I can post patch for
> same.

That is how you handle the EINTR errno in userspace.  I think you'd need
to show how -EINTR could show up in this code path in the kernel before
worrying about how to handle it.

josh

  reply	other threads:[~2007-07-13 13:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-13  6:07 UBI: Can we handle -EINTR differently in erase/write path??? Vinit Agnihotri
2007-07-13 13:06 ` Josh Boyer [this message]
2007-07-14 11:59   ` Vinit Agnihotri
2007-07-17  8:16 ` Artem Bityutskiy
2007-07-17 10:36 ` Artem Bityutskiy
2007-07-17 10:48   ` Vinit Agnihotri
2007-07-18  8:52 ` 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=1184331963.6456.3.camel@weaponx.rchland.ibm.com \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vinit.agnihotri@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