Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7780282ybn; Mon, 30 Sep 2019 20:43:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMiaKAJY8QkyTDSfvapu4unnoygul6M9wNBjWYFuQRbIeL73TGMHnajVlyTYyA04c3a6SO X-Received: by 2002:a17:906:5a96:: with SMTP id l22mr21553723ejq.310.1569901384731; Mon, 30 Sep 2019 20:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569901384; cv=none; d=google.com; s=arc-20160816; b=sFZP+/bl1w4z5spdfuSCCSHiaVWUzwTZXPqPCsZn9EwUQFpcsCWC2OrBgETARDhA91 /CLS/aRvGjY0WRndQgUXwTodXN5SnRQGDy7FzfUtWs4oo/Gxawf7SBdnRKnYTa3AkwEw J/B0wIyxcsKS8s1As/4Pvz3MtA/puStV5ZBG26ELORczHLrAvH8VhNqSGPfMNM2EB0ry E8vmZ4dz6u8bnyMJxVZdw4JxM1C58KT9uzgN+y4s1HiBdi92cO7Hap8IxFdKbnmCX8ZQ qvWyQlO+4saYjIFtUsWsXxi36Rrihzh5aOfPBlNBaOAS4KV6ZO4LcGvRPfGJUz6hrJE9 y/Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WaM61durTUCJ9gtJy39A13xkdum8vegyHiHhxWy1wpw=; b=PYhu3TKu5FJvIbI1pzlw4rEMHFZkdHfgMsOMdKq3q4MOrsylVLI+4ycyKHOGjjBGos K6LdB5guJ//1ZP4NWS/1DN1w/2oVn0t3jnqzBKkoOeJNjYZ0RVwlPoXxlyC6s52QmdZq xo1fCARTVMlK9gJyvc0Fi63eXMCHEUb0tbrrmzldlOjo7jDnGb5rALeTGls3+l2CFQ2p avx15X2xRbt5u0EOEYugEsSdAiED/AppsH6Puzj22yvAVeHTqnh5q1b+RS7GG3ZhEZsU BdVQQbLYvozTAZeuGPm7r4CRC9RP4gBdPe7kUH7MGkm94EnNzOQZIaHFRt+fQRoqsoD/ lLOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fN+KwSQ+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si7472479ejj.132.2019.09.30.20.42.38; Mon, 30 Sep 2019 20:43:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fN+KwSQ+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728134AbfJADjE (ORCPT + 99 others); Mon, 30 Sep 2019 23:39:04 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:51074 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726784AbfJADjE (ORCPT ); Mon, 30 Sep 2019 23:39:04 -0400 Received: by mail-wm1-f67.google.com with SMTP id 5so1558310wmg.0 for ; Mon, 30 Sep 2019 20:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WaM61durTUCJ9gtJy39A13xkdum8vegyHiHhxWy1wpw=; b=fN+KwSQ+Gj8YtzgTeMTjKXgzvhO6+3j1XBLCHXwQNRn8nDl6XSI0dpvomx6JXkMRm/ yh70SDobdSJpEXxViJhWwsb6Ppe9/FdPikTRFEAzdtQC+hvhkEBUqdhm/qZ32Y7oG3oa W9ZLTucqFcsWxRBQAQEOWmr2HpitVzb8QmwsoKY2gJRYdoO0WTj5hSHclA4IyeI2Dn1Y 9ZmC9sWNitf4VPbhSS6J79/YPSsIm+wLFyrx9sxEeVTYdyLNXyEVfOwD1WZgSHIWjadn YPfntraaAashQqLbtM47hNuQGD5zW4f3HU4kAQvM5t0XYPDn8FswCrR7dD+GMeZ5/Bhv VpMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WaM61durTUCJ9gtJy39A13xkdum8vegyHiHhxWy1wpw=; b=WVGEW89QKikzf/4t6hfzYUiDoFWXpHOVI9uO+4DWro6nHVH6i3XnGZXXXS2K6TcrAZ 0BpMr8Hcjdr9VYkLLsNQKE6bdU45KzdvjL3CGLYPJZ4V2dRj5mCBZuD9oEiiFAc8rgV5 2T4ZYoYxLMVeYDEnAiM7pzCizji5Wpo71FmPEXCkgx/Cf7BiV7kk3urO2rvZSUVvKgnB R2G0VGlCSBvpY8PL6iAaQXyE8Rgj4PahK6RdsX8UNUitz7GqVn90NSRP8LlMOLXG3z+L HmapJ1L4iGabxRjEMsIlb8Ibp32iqnjt2jI6NaPt8q/l5cyhuB44DfZRVFDL8l/YOb44 jWjg== X-Gm-Message-State: APjAAAUM2Mf7jSzvGYE2y6aqQzj2mh8l9S823U6hSTxWjlMSaPa8V6Ik HUfS4uSzsOCPFlPNvks81GLWHXj+DHOQgWzrObitgg== X-Received: by 2002:a1c:2d85:: with SMTP id t127mr1832686wmt.81.1569901142201; Mon, 30 Sep 2019 20:39:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David F." Date: Mon, 30 Sep 2019 20:38:50 -0700 Message-ID: Subject: Re: What populates /proc/partitions ? To: Randy Dunlap , masneyb@onstation.org Cc: linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Well, it's not straightforward. No direct calls, it must be somehow when kmod is used to load the module. The only difference I see in the udevadm output is the old system has attribute differences capability new==11, old==1, event_poll_msec new=2000, old=-1. I figured if i could set the "hidden" attribute to 1 then it looks like /proc/partitions won't list it (already "removable"attribute), but udev doesn't seem to allow changing the attributes, only referencing them. unless I'm missing something? On Mon, Sep 30, 2019 at 5:13 PM David F. wrote: > > Thanks for the replies. I'll see if I can figure this out. I know > with the same kernel and older udev version in use that it didn't add > it, but with the new udev (eudev) it does (one big difference is the > new one requires and uses devtmpfs and the old one didn't). > > I tried making the floppy a module but it still loads on vmware player > and the physical test system I'm using that doesn't have one but > reports it as existing (vmware doesn't hang, just adds fd0 read errors > to log, but physical system does hang while fdisk -l, mdadm --scan > runs, etc..). > > As far as the log, debugging udev output, it's close to the same, the > message log (busybox) not much in there to say what's up. I even > tried the old .rules that were being used with the old udev version, > but made no difference. > > On Mon, Sep 30, 2019 at 4:49 PM Randy Dunlap wrote: > > > > 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