linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: NeilBrown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH md 1 of 2] Add interface to md driver for userspace monitoring of events.
Date: Fri, 3 Sep 2004 03:19:20 -0700	[thread overview]
Message-ID: <20040903031920.11e31d3f.akpm@osdl.org> (raw)
In-Reply-To: <E1C33nX-00040i-9v@notabene.cse.unsw.edu.au>

NeilBrown <neilb@cse.unsw.edu.au> wrote:
>
> Every interesting md event (device failure, rebuild, add,remove etc) gets treated 
>  as an 'urgent data' on /proc/mdstat and cause select to return if waiting for exceptions, 
>  and poll to return if waiting PRIority data.
> 
>  To collect an event, the program must re-read /proc/mdstat from start to finish,
>  and then must select/poll on the file descriptor (or close it).
> 
>  Events aren't returned as a list of individual events, only as a notification
>  that something might have happened, and reading /proc/mdstat should show what 
>  it was.
> 
>  If a program opens /proc/mdstat with O_RDWR it signals that it intends
>  to handle events.  In some cases the md driver might want to wait for
>  an event to be handled before deciding what to do next.  For example
>  when the last path of a multipath fails, the md driver could either
>  fail all requests, or could wait for a working path to be provided.
>  It can do this by waiting for the failure event to be handled, and
>  then making the decission.  A program that is handling events should
>  read /proc/mdstat to determine new state, and then handle any events
>  before either calling select/poll.  By doing this, or by closing the
>  file, the program indicates that it has done all that it plans to do
>  about the event.

Christoph points out that this is fairly wild procfs abuse.  We want to be
moving away from that sort of thing, not adding to it.

Is it possible to use rml's new event stuff from rc1-mm3's
kernel-sysfs-events-layer.patch?  Or a bare netlink interface?  Or raidfs?

  reply	other threads:[~2004-09-03 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03  2:27 [PATCH md 0 of 2] Introduction NeilBrown
2004-09-03  2:27 ` [PATCH md 1 of 2] Add interface to md driver for userspace monitoring of events NeilBrown
2004-09-03 10:19   ` Andrew Morton [this message]
2004-09-06  1:05     ` Neil Brown
2004-09-06 14:02       ` Christoph Hellwig
2004-09-06 22:53         ` Neil Brown
2004-09-06 23:07           ` Andrew Morton
2004-09-07  0:53             ` Neil Brown
2004-09-07 10:45               ` Christoph Hellwig
2004-09-03  2:27 ` [PATCH md 2 of 2] Correct "working_disk" counts for raid5 and raid6 NeilBrown

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=20040903031920.11e31d3f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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).