Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7837971ybn; Mon, 30 Sep 2019 22:02:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOexx745CLk08EOdVPTehBTNsOt8uYEIly1IjUhzSy39S2wfZ/D4BJMuSEnLoXhWcfOC0G X-Received: by 2002:a05:6402:290:: with SMTP id l16mr19808759edv.178.1569906135383; Mon, 30 Sep 2019 22:02:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569906135; cv=none; d=google.com; s=arc-20160816; b=i6Y2SVPwyx3AkuB9OU3OAy1YnPtSUzIbeJLPF6Lbq/SejBi5l+QTDoIsWoU5Dz4/MP SumVWiJbjj9oBrGBOgqGLTpm7fbTT4xr1lbanS5qLS9rYiSi4hhrszA05FhBZKb1JX/7 cICHFxvxWhKQeFnPw2jThcsaq6WR+Qt18Cc/ygqnu7YyG/8xYkcXbM4orGqldM5ZN28v BUEIG9oIoKX228UxkLo2DVKYZp089Jxv+KFfNQe64oP0htfWWDwMemtAlIW/zqEcfyYj FfZJtqDqvkFzZCmrhBHDcExeSTw0tiTZsJkX3vaV2LfTPes4b3kUvdhSFPMg7CzKvDUp Kkrg== 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=jQsWSOldLeYRhlRW8KzWkcAheQbid8xttsB0PA3P2AA=; b=gMOac2nsRuXLZdklpCJkpfSjXepGZgNfBUJdyJRVZBETA6PbIs0QWwqJn5nJqoZVUJ 3QQ1OCLgL60OvqLHxk39NHN3qD++ipnZFB9keQUsY3UHvU66RRhcxjbgXYnoNhmv8FE1 UOsnEwU6WNZ+c+prG69RP1Ig3Z9xmxpgrk6oJHt/vmu8r7WmWvKYcFMgWLp/XL+kbenX o6bsGiEDHl3dg92OKbx+yA1zcQqh6xcxgME9QNphuXhkwdy6x1AUTkXMo6HaO2f/Sm5d w+hcxU7Os/c9Sa1wy12HbcmZ3wQMu/Ad6jDhTymuDKv8kC/MGbFn6CkCfQfxLw2Rbdzf pL0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oKXjtoYc; 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 n13si8059863ejr.34.2019.09.30.22.01.50; Mon, 30 Sep 2019 22:02:15 -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=oKXjtoYc; 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 S1729457AbfJAFAK (ORCPT + 99 others); Tue, 1 Oct 2019 01:00:10 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41935 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729406AbfJAFAK (ORCPT ); Tue, 1 Oct 2019 01:00:10 -0400 Received: by mail-wr1-f66.google.com with SMTP id h7so13708933wrw.8 for ; Mon, 30 Sep 2019 22:00:07 -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=jQsWSOldLeYRhlRW8KzWkcAheQbid8xttsB0PA3P2AA=; b=oKXjtoYcoacChGudY9aDGo3pnpMBEyH+lNhjxax/xtfQd7jp1DmyOQ0IRxNfAVy2Iv 0O0qf/9QhX1UOTUpHGWOakhr9nHMMb1f37zuXdPAffz5w58hssGCwtv18CHzstzgXBy+ OIFW6zPcQQXJ9uDUpnz+vWBmucTfBNzNxVZEXfPwg645thffHtiKkLuzW7TwYSnBnRoG OGWmp38+J0JtZaM6mHSCNkucgG7Re1zo3MGhRXMgg5PGZCJqJ3e9Ce5ME499GHfjI2mH qGTIu8LMfpHZ76/kCoa0SlFBQdyKi+pfOrVsRSeTPKh8BGBlvAMC3JHnFgUlXo31gJfS I4Vw== 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=jQsWSOldLeYRhlRW8KzWkcAheQbid8xttsB0PA3P2AA=; b=qchX9s4pZ4Tfvfg9iNbn24m3AE/goRBLLYChucIKwpUnxCZWhcruaCsWmjpnWmZ4wl pb35LQnruKqVo3jdvHv8Qs6f+i8diby+i1Z0c1KqA1eCn6y6NDTbiWwsDKk4IZOg3wVH 2mhtPdjPBku1CTdWzW2Ki74f4FhPi285aIZe3Im7yJCz39fcO04zrmiOO6NzRCLVJ58P /F8wtJ60IDb+n6o0lhDWLB4DwcplM6rRoyN78kBvnFd/b9hiJgiOJ8hwMvN/Xk+BsJ0P Q2ODKcEoyOJ7ipOZ8vSpLvIlOriGxSXHlxtc9C9p/4134ysx9dG+rRAS8SQFQBc0YHYx Pxvw== X-Gm-Message-State: APjAAAXHzx/zFEUwUET5Z3Fg92z4HFk+at7Sax9q7jU0S22F5afv95xY 6Rd/lUH6qDzR2jQRpNqDhm3NAeBb1Wx+p4I36oc5Lg== X-Received: by 2002:a5d:5052:: with SMTP id h18mr15296298wrt.397.1569906006800; Mon, 30 Sep 2019 22:00:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David F." Date: Mon, 30 Sep 2019 21:59:56 -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 It has something to do with devtmpfs that causes it. If I could set this GENHD_FL_HIDDEN flag on it, it would solve the problem on those system that say the have a floppy but doesn't really exist. Is something built-in to allow that or it's up to the driver itself? On Mon, Sep 30, 2019 at 8:38 PM David F. wrote: > > 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