From: Neil Brown <neilb@suse.de>
To: David Greaves <david@dgreaves.com>
Cc: Mike Accetta <maccetta@laurelnetworks.com>, linux-raid@vger.kernel.org
Subject: Re: Partitioned arrays initially missing from /proc/partitions
Date: Tue, 24 Apr 2007 20:57:09 +1000 [thread overview]
Message-ID: <17965.57989.120710.460711@notabene.brown> (raw)
In-Reply-To: message from David Greaves on Tuesday April 24
On Tuesday April 24, david@dgreaves.com wrote:
> Neil Brown wrote:
> > This problem is very hard to solve inside the kernel.
> > The partitions will not be visible until the array is opened *after*
> > it has been created. Making the partitions visible before that would
> > be possible, but would be very easy.
> >
> > I think the best solution is Mike's solution which is to simply
> > open/close the array after it has been assembled. I will make sure
> > this is in the next release of mdadm.
> >
> > Note that you can still access the partitions even though they do not
> > appear in /proc/partitions. Any attempt to access and of them will
> > make them all appear in /proc/partitions. But I understand there is
> > sometimes value in seeing them before accessing them.
> >
> > NeilBrown
>
> Um. Are you sure?
"Works for me".
What happens if you
blockdev --rereadpt /dev/md_d0
?? It probably works then.
It sounds like someone is deliberately removing all the partition
info.
Can you try this patch and see if it reports anyone calling
'2' on md_d0 ??
diff .prev/block/ioctl.c ./block/ioctl.c
--- .prev/block/ioctl.c 2007-04-17 11:42:15.000000000 +1000
+++ ./block/ioctl.c 2007-04-24 20:55:41.000000000 +1000
@@ -17,6 +17,7 @@ static int blkpg_ioctl(struct block_devi
long long start, length;
int part;
int i;
+ char b[BDEVNAME_SIZE];
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
@@ -30,6 +31,8 @@ static int blkpg_ioctl(struct block_devi
part = p.pno;
if (part <= 0 || part >= disk->minors)
return -EINVAL;
+ printk("blkpg_ioctl: %s called %d on %s\n",
+ current->comm, a.op, bdevname(bdev, b));
switch (a.op) {
case BLKPG_ADD_PARTITION:
start = p.start >> 9;
next prev parent reply other threads:[~2007-04-24 10:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 20:53 Partitioned arrays initially missing from /proc/partitions Mike Accetta
2007-04-23 14:56 ` David Greaves
2007-04-23 19:31 ` Mike Accetta
2007-04-23 23:52 ` Neil Brown
2007-04-24 9:22 ` David Greaves
2007-04-24 10:57 ` Neil Brown [this message]
2007-04-24 12:00 ` David Greaves
2007-04-24 10:49 ` David Greaves
2007-04-24 11:38 ` Neil Brown
2007-04-24 12:32 ` David Greaves
2007-05-07 8:28 ` David Greaves
2007-05-07 9:01 ` Neil Brown
2007-04-24 15:39 ` Doug Ledford
2007-04-24 9:37 ` David Greaves
2007-04-24 9:46 ` David Greaves
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=17965.57989.120710.460711@notabene.brown \
--to=neilb@suse.de \
--cc=david@dgreaves.com \
--cc=linux-raid@vger.kernel.org \
--cc=maccetta@laurelnetworks.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).