From: Luca Berra <bluca@comedia.it>
To: linux-raid@vger.kernel.org
Subject: Re: [PATCH md 3 of 4] Delete unplug timer before shutting down md array.
Date: Tue, 2 Nov 2004 08:12:59 +0100 [thread overview]
Message-ID: <20041102071258.GA9190@percy.comedia.it> (raw)
In-Reply-To: <20041101213333.201769d0.akpm@osdl.org>
On Mon, Nov 01, 2004 at 09:33:33PM -0800, Andrew Morton wrote:
>> md has the misfortune of working in a way that doesn't fit very well
>> with some aspects of the blkdev layer.
>>
>> To create an md array, you open /dev/mdX, and use some ioctls to set
>> up the array. Thus the block device must exist internally as a block
>> device before any details about it are available.
>>
>> Similarly, to shut down an array, you open /dev/mdX and use an ioctl
>> to shut it down. This it will still be open (though only once) after
>> it has been shut down.
>>
>> (as I understand it) I can only safely use blk_cleanup_queue on the
>> queue after (or during) the last close. Thus I cannot use it while
>> shutting down an array.
>> However I need to release the md personality as part of shutting down
>> the array, so I have to disable the unplug function (which is handled
>> by the personality).
>>
>> I could change ->unplug_fn to point to something safe, but there is
>> still a race with the timer going off at just the wrong time.
>
>hm, OK. So perhaps using /dev/mdX as a control channel for creating and
>destroying /dev/mdX was unfortunate design. Ho hum.
would it be unfeasible to create a custom (misc) character device, say
/dev/mdadm and use that to control arrays instead of /dev/md0?
Regards,
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
next prev parent reply other threads:[~2004-11-02 7:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 3:37 [PATCH md 0 of 4] Introduction NeilBrown
2004-11-02 3:37 ` [PATCH md 3 of 4] Delete unplug timer before shutting down md array NeilBrown
2004-11-02 4:57 ` Andrew Morton
2004-11-02 5:00 ` Andrew Morton
2004-11-02 4:28 ` Neil Brown
2004-11-02 5:33 ` Andrew Morton
2004-11-02 7:12 ` Luca Berra [this message]
2004-11-03 0:29 ` Neil Brown
2004-11-03 23:03 ` Andrew Morton
2004-11-04 9:21 ` Jens Axboe
2004-11-05 8:52 ` Jens Axboe
2004-11-07 23:38 ` Neil Brown
2004-11-07 23:42 ` Andrew Morton
2004-11-08 1:21 ` Neil Brown
2004-11-08 11:23 ` Jens Axboe
2004-11-02 3:37 ` [PATCH md 4 of 4] "Faulty" personality of md NeilBrown
2004-11-02 9:31 ` Lars Marowsky-Bree
2004-11-02 23:30 ` Neil Brown
2004-11-02 3:37 ` [PATCH md 1 of 4] Fix problem with md/linear for devices larger than 2 terabytes NeilBrown
2004-11-02 3:37 ` [PATCH md 2 of 4] Fix raid6 problem 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=20041102071258.GA9190@percy.comedia.it \
--to=bluca@comedia.it \
--cc=linux-raid@vger.kernel.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.