From: Randy Dunlap <rdunlap@infradead.org>
To: "David F." <df7729@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: What populates /proc/partitions ?
Date: Mon, 30 Sep 2019 16:49:48 -0700 [thread overview]
Message-ID: <c0d9d434-1f47-66a0-1129-5003f2f2eb5c@infradead.org> (raw)
In-Reply-To: <CAGRSmLsV96jK+7UB6T6k8j9u74oPSHTA+1TPU8F9G2NnOqCDJg@mail.gmail.com>
On 9/30/19 3:47 PM, David F. wrote:
> Hi,
>
> I want to find out why fd0 is being added to /proc/partitions and stop
> that for my build. I've searched "/proc/partitions" and "partitions",
> not finding anything that matters.
/proc/partitions is produced on demand by causing a read of it.
That is done by these functions (pointers) in block/genhd.c:
static const struct seq_operations partitions_op = {
.start = show_partition_start,
.next = disk_seqf_next,
.stop = disk_seqf_stop,
.show = show_partition
};
in particular, show_partition(). In turn, that function uses data that was
produced upon block device discovery, also in block/genhd.c.
See functions disk_get_part(), disk_part_iter_init(), disk_part_iter_next(),
disk_part_iter_exit(), __device_add_disk(), and get_gendisk().
> If udev is doing it, what function is it call so I can search on that?
I don't know about that. I guess in the kernel it is about "uevents".
E.g., in block/genhd.c, there are some calls to kobject_uevent() or variants
of it.
> TIA!!
There should be something in your boot log about "fd" or "fd0" or floppy.
eh?
--
~Randy
next prev parent reply other threads:[~2019-09-30 23:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 22:47 What populates /proc/partitions ? David F.
2019-09-30 23:46 ` Brian Masney
2019-09-30 23:49 ` Randy Dunlap [this message]
2019-10-01 0:13 ` David F.
2019-10-01 3:38 ` David F.
2019-10-01 4:59 ` David F.
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=c0d9d434-1f47-66a0-1129-5003f2f2eb5c@infradead.org \
--to=rdunlap@infradead.org \
--cc=df7729@gmail.com \
--cc=linux-kernel@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 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).