From nobody@FreeBSD.org Mon Apr 19 01:09:02 2010 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CCEC106564A for ; Mon, 19 Apr 2010 01:09:02 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 256568FC08 for ; Mon, 19 Apr 2010 01:09:02 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o3J1927b002248 for ; Mon, 19 Apr 2010 01:09:02 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o3J192F4002235; Mon, 19 Apr 2010 01:09:02 GMT (envelope-from nobody) Message-Id: <201004190109.o3J192F4002235@www.freebsd.org> Date: Mon, 19 Apr 2010 01:09:02 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org Subject: [geom] geom_stat_open showing cached information for non-present iso X-Send-Pr-Version: www-3.1 X-GNATS-Notify: >Number: 145818 >Category: kern >Synopsis: [geom] geom_stat_open showing cached information for non-present iso >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-geom >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 19 01:10:00 UTC 2010 >Closed-Date: >Last-Modified: Mon Apr 19 14:00:14 UTC 2010 >Originator: Garrett Cooper >Release: 9-CURRENT >Organization: Cisco Systems, Inc. >Environment: FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r206173M: Sat Apr 17 22:42:39 PDT 2010 root@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA amd64 >Description: Started playing around with gstat(8) for the first time today, and I noticed that geom(4) was reporting a cached, non-present value for a DVD that was previously mounted via vlc via cam(4), and was gracefully ejected and removed from the system. # gstat dT: 1.009s w: 1.000s L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name 0 0 0 0 0.0 0 0 0.0 0.0| mfid0 0 0 0 0 0.0 0 0 0.0 0.0| mfid0a 0 0 0 0 0.0 0 0 0.0 0.0| cd0 0 3 0 0 0.0 3 48 0.9 0.1| ada0 0 0 0 0 0.0 0 0 0.0 0.0| iso9660/THE_BIG_L EBOWSKI 0 3 0 0 0.0 3 48 0.9 0.1| ada0s1 0 0 0 0 0.0 0 0 0.0 0.0| ada0s1a 0 0 0 0 0.0 0 0 0.0 0.0| ada0s1b 0 3 0 0 0.0 3 48 0.9 0.1| ada0s1d 0 0 0 0 0.0 0 0 0.0 0.0| ada0s1e 0 0 0 0 0.0 0 0 0.0 0.0| ada0s1f 0 0 0 0 0.0 0 0 0.0 0.0| ada0s1g 0 0 0 0 0.0 0 0 0.0 0.0| ada0s1h 0 0 0 0 0.0 0 0 0.0 0.0| label/swap It appears that glabel / geom(4) is still tracking the status: # glabel status Name Status Components iso9660/THE_BIG_LEBOWSKI N/A cd0 label/swap N/A ada0s1b The DVD isn't mounted though: $ mount | grep cd0 $ However, nothing is actually present as you can see in the following output from sysutils/dvd+rw-tools: $ dvd+rw-mediainfo /dev/cd0 INQUIRY: [ATAPI ][iHAS124 Y ][BL0V] GET [CURRENT] CONFIGURATION: :-( no media mounted, exiting... Some other important details are included below. # /var/run/dmesg.boot Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-CURRENT #0 r206173M: Sat Apr 17 22:42:39 PDT 2010 root@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA amd64 Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(R) CPU W3520 @ 2.67GHz (2694.12-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x106a5 Family = 6 Model = 1a Stepping = 5 Features=0xbfebfbff Features2=0x9ce3bd AMD Features=0x28100800 AMD Features2=0x1 TSC: P-state invariant real memory = 12884901888 (12288 MB) avail memory = 12380594176 (11807 MB) ACPI APIC Table: <022410 APIC1801> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 cpu4 (AP): APIC ID: 4 cpu5 (AP): APIC ID: 5 cpu6 (AP): APIC ID: 6 cpu7 (AP): APIC ID: 7 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard kbd1 at kbdmux0 kqemu version 0x00010400 kqemu: KQEMU installed, max_locked_mem=6275892kB. acpi0: <022410 RSDT1801> on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of fee00000, 1000 (3) failed acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, bff00000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 cpu4: on acpi0 cpu5: on acpi0 cpu6: on acpi0 cpu7: on acpi0 acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pcib2: at device 0.0 on pci1 pci3: on pcib2 pcib3: mem 0xf7fffc00-0xf7fffc7f irq 28 at device 0.1 on pci1 pci2: on pcib3 pcib4: at device 3.0 on pci0 pci4: on pcib4 vgapci0: port 0xbc00-0xbc7f mem 0xfa000000-0xfaffffff,0xd0000000-0xdfffffff,0xf8000000-0xf9ffffff irq 24 at device 0.0 on pci4 nvidia0: on vgapci0 vgapci0: child nvidia0 requested pci_enable_busmaster vgapci0: child nvidia0 requested pci_enable_io vgapci0: child nvidia0 requested pci_enable_io nvidia0: [ITHREAD] pcib5: at device 7.0 on pci0 pci5: on pcib5 mfi0: port 0xc000-0xc0ff mem 0xfbcc0000-0xfbcfffff,0xfbc80000-0xfbcbffff irq 30 at device 0.0 on pci5 mfi0: Megaraid SAS driver Ver 3.00 mfi0: 4652 (324859415s/0x0020/info) - Shutdown command received from host mfi0: 4653 (boot + 3s/0x0020/info) - Firmware initialization started (PCI ID 0060/1000/1012/1000) mfi0: 4654 (boot + 3s/0x0020/info) - Firmware version 1.40.132-0796 mfi0: 4655 (boot + 4s/0x0008/info) - Battery Present mfi0: 4656 (boot + 4s/0x0020/info) - Board Revision mfi0: 4657 (boot + 18s/0x0002/info) - Inserted: PD 04(e0xff/s4) mfi0: 4658 (boot + 18s/0x0002/info) - Inserted: PD 04(e0xff/s4) Info: enclPd=ffff, scsiType=0, portMap=01, sasAddr=707e874988ddfaac,0000000000000000 mfi0: 4659 (boot + 18s/0x0002/info) - Inserted: PD 05(e0xff/s5) mfi0: 4660 (boot + 18s/0x0002/info) - Inserted: PD 05(e0xff/s5) Info: enclPd=ffff, scsiType=0, portMap=00, sasAddr=396a3a43c2b2907e,0000000000000000 mfi0: 4661 (boot + 18s/0x0002/info) - Inserted: PD 06(e0xff/s6) mfi0: 4662 (boot + 18s/0x0002/info) - Inserted: PD 06(e0xff/s6) Info: enclPd=ffff, scsiType=0, portMap=02, sasAddr=396a3a44beb48e7e,0000000000000000 mfi0: 4663 (boot + 18s/0x0002/info) - Inserted: PD 07(e0xff/s7) mfi0: 4664 (boot + 18s/0x0002/info) - Inserted: PD 07(e0xff/s7) Info: enclPd=ffff, scsiType=0, portMap=03, sasAddr=707e8749a6cfd6ac,0000000000000000 mfi0: [ITHREAD] pci0: at device 20.0 (no driver attached) pci0: at device 20.1 (no driver attached) pci0: at device 20.2 (no driver attached) pci0: at device 20.3 (no driver attached) uhci0: port 0xa800-0xa81f irq 16 at device 26.0 on pci0 uhci0: [ITHREAD] uhci0: LegSup = 0x2f00 usbus0: on uhci0 uhci1: port 0xa880-0xa89f irq 21 at device 26.1 on pci0 uhci1: [ITHREAD] uhci1: LegSup = 0x2f00 usbus1: on uhci1 uhci2: port 0xac00-0xac1f irq 19 at device 26.2 on pci0 uhci2: [ITHREAD] uhci2: LegSup = 0x2f00 usbus2: on uhci2 ehci0: mem 0xf7eff000-0xf7eff3ff irq 18 at device 26.7 on pci0 ehci0: [ITHREAD] usbus3: EHCI version 1.0 usbus3: on ehci0 pcib6: irq 17 at device 28.0 on pci0 pci7: on pcib6 pcib7: irq 16 at device 28.1 on pci0 pci6: on pcib7 re0: port 0xd800-0xd8ff mem 0xfbdff000-0xfbdfffff,0xf6ef0000-0xf6efffff irq 17 at device 0.0 on pci6 re0: Using 1 MSI messages re0: Chip rev. 0x3c000000 re0: MAC rev. 0x00400000 re0: Hardware rev. 0x3c400000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto re0: Ethernet address: e0:cb:4e:01:49:32 re0: [FILTER] uhci3: port 0xa080-0xa09f irq 23 at device 29.0 on pci0 uhci3: [ITHREAD] uhci3: LegSup = 0x2f00 usbus4: on uhci3 uhci4: port 0xa400-0xa41f irq 19 at device 29.1 on pci0 uhci4: [ITHREAD] uhci4: LegSup = 0x2f00 usbus5: on uhci4 uhci5: port 0xa480-0xa49f irq 18 at device 29.2 on pci0 uhci5: [ITHREAD] uhci5: LegSup = 0x2f00 usbus6: on uhci5 ehci1: mem 0xf7efe000-0xf7efe3ff irq 23 at device 29.7 on pci0 ehci1: [ITHREAD] usbus7: EHCI version 1.0 usbus7: on ehci1 pcib8: at device 30.0 on pci0 pci8: on pcib8 emu10kx0: port 0xec00-0xec3f irq 16 at device 0.0 on pci8 emu10kx0: [ITHREAD] pcm0: on emu10kx0 pcm0: pcm1: on emu10kx0 pcm2: on emu10kx0 pcm3: on emu10kx0 pcm4: on emu10kx0 fwohci0: mem 0xfbeff000-0xfbefffff irq 19 at device 4.0 on pci8 fwohci0: [ITHREAD] fwohci0: OHCI version 1.0 (ROM=1) fwohci0: No. of Isochronous channels is 8. fwohci0: EUI64 00:1e:8c:00:00:bd:6e:33 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: fwohci_intr_core: BUS reset fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port 0x9c00-0x9c07,0x9880-0x9883,0x9800-0x9807,0x9480-0x9483,0x9400-0x941f mem 0xf7efc000-0xf7efc7ff irq 19 at device 31.2 on pci0 ahci0: [ITHREAD] ahci0: AHCI v1.20 with 6 3Gbps ports, Port Multiplier supported ahcich0: at channel 0 on ahci0 ahcich0: [ITHREAD] ahcich1: at channel 1 on ahci0 ahcich1: [ITHREAD] ahcich2: at channel 2 on ahci0 ahcich2: [ITHREAD] ahcich3: at channel 3 on ahci0 ahcich3: [ITHREAD] ahcich4: at channel 4 on ahci0 ahcich4: [ITHREAD] ahcich5: at channel 5 on ahci0 ahcich5: [ITHREAD] ichsmb0: port 0x400-0x41f mem 0xf7efd000-0xf7efd0ff irq 18 at device 31.3 on pci0 ichsmb0: [ITHREAD] smbus0: on ichsmb0 smb0: on smbus0 acpi_button0: on acpi0 atrtc0: port 0x70-0x71 irq 8 on acpi0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 uart0: [FILTER] coretemp0: on cpu0 est0: on cpu0 p4tcc0: on cpu0 coretemp1: on cpu1 est1: on cpu1 p4tcc1: on cpu1 coretemp2: on cpu2 est2: on cpu2 p4tcc2: on cpu2 coretemp3: on cpu3 est3: on cpu3 p4tcc3: on cpu3 coretemp4: on cpu4 est4: on cpu4 p4tcc4: on cpu4 coretemp5: on cpu5 est5: on cpu5 p4tcc5: on cpu5 coretemp6: on cpu6 est6: on cpu6 p4tcc6: on cpu6 coretemp7: on cpu7 est7: on cpu7 p4tcc7: on cpu7 Timecounters tick every 1.000 msec firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0) (me) firewire0: bus manager 0 usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 480Mbps High Speed USB v2.0 usbus4: 12Mbps Full Speed USB v1.0 usbus5: 12Mbps Full Speed USB v1.0 usbus6: 12Mbps Full Speed USB v1.0 usbus7: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 ugen6.1: at usbus6 uhub6: on usbus6 ugen7.1: at usbus7 uhub7: on usbus7 uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 2 ports with 2 removable, self powered uhub4: 2 ports with 2 removable, self powered uhub5: 2 ports with 2 removable, self powered uhub6: 2 ports with 2 removable, self powered mfi0: 4665 (324859443s/0x0020/info) - Time established as 04/17/10 22:44:03; (21 seconds since power on) mfid0: on mfi0 mfid0: 1905440MB (3902341120 sectors) RAID volume '' is optimal uhub3: 6 ports with 6 removable, self powered uhub7: 6 ports with 6 removable, self powered ugen6.2: at usbus6 ukbd0: on usbus6 kbd2 at ukbd0 uhid0: on usbus6 ada0 at ahcich1 bus 0 scbus2 target 0 lun 0 ada0: ATA-8 SATA 2.x device ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)cd0 at ahcich0 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) cd0: cd present [3920422 x 2048 byte records] ada0: Command Queueing enabled ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) SMP: AP CPU #1 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #6 Launched! SMP: AP CPU #5 Launched! SMP: AP CPU #7 Launched! SMP: AP CPU #4 Launched! ugen6.3: at usbus6 ums0: on usbus6 ums0: 3 buttons and [XYZ] coordinates ID=0 Trying to mount root from ufs:/dev/ada0s1a mfi0: 4666 (324859494s/0x0008/info) - Battery temperature is normal re0: miibus_statchg: 0x00100030, 0x00000010, [0x00000003, 0x00000006, 0x00000010] re0: link state changed to UP $ kldstat -v Id Refs Address Size Name 1 28 0xffffffff80100000 779f60 kernel (/boot/kernel/kernel) Contains modules: Id Name 145 if_lo 182 elf32 136 elf64 137 shell 123 pseudofs 147 igmp 146 if_tun 140 sysvmsg 141 sysvsem 143 sem 142 sysvshm 154 krpc 152 nfssvc 151 nfsserver 153 nfslockd 148 nfs_common 155 ufs 135 cd9660 149 nfs 120 devfs 122 procfs 121 msdosfs 6 cam 38 ata 15 pass 132 g_part_mbr 131 g_part_gpt 130 g_part_ebr 129 g_part_bsd 13 ada 10 probe 12 ch 14 da 7 xpt 11 cd 8 aprobe 9 pmp 25 pcib/acpi_pci 98 emu10kx/snd_emu10kx_midi 97 emu10kx/snd_emu10kx_pcm 96 pci/snd_emu10kx 31 acpi/acpi_smbat 195 isa/orm 95 smbus/smb 194 isa/atdma 193 acpi/atdma 192 legacy/isa 30 acpi/acpi_sysresource 94 random 191 isa/attimer 190 acpi/attimer 189 isa/atrtc 188 acpi/atrtc 93 pty 187 cpu/p4tcc 186 cpu/hwpstate 21 acpi/acpi_ec 92 pci/vgapci 185 cpu/est 184 cpu/powernow 91 pci/pcib 90 pcib/pci 45 fwohci/firewire 44 cpu/ichss 43 pci/ata_intel 42 pci/ata_ahci 41 atapci/ata_ahci_ata 24 acpi/acpi_lid 181 isa/vga 180 vgapci/vgapm 40 pci/atapci 179 isa/sc 178 scrndr-vga 177 scterm-scteken 176 io 39 atapci/ata 175 cpu/coretemp 89 pci/isab 174 isa/atkbdc 173 acpi/atkbdc 172 atkbdc/atkbd 171 hostb/agp_via 170 hostb/agp_intel 169 vgapci/agp_i810 168 hostb/agp_amd64 88 pci/ignore_pci 87 pci/hostb 167 legacy/pcib 166 isa/pcibus_pnp 86 pci/fixup_pci 85 null 84 miibus/xmphy 165 root/nexus 164 nexus/ram 163 isa/sysresource 83 miibus/ukphy 82 miibus/truephy 81 miibus/tlphy 80 miibus/tdkphy 79 miibus/smcphy 78 miibus/ruephy 119 watchdog 77 miibus/rlphy 118 uhub/ums 76 miibus/rgephy 75 miibus/qsphy 117 uhub/ukbd 116 uhub/uhid 162 nexus/legacy 161 legacy/cpu 74 miibus/pnaphy 73 miibus/nsphyter 160 pci/ioapic 159 nexus/apic 115 usbus/uhub 114 uhub/uhub 158 acpi/fpupnp 72 miibus/nsphy 71 miibus/nsgphy 70 miibus/mlphy 69 miibus/lxtphy 68 miibus/jmphy 67 miibus/ip1000phy 66 miibus/inphy 65 miibus/icsphy 64 miibus/gentbi 157 root/nexus_acpi 63 miibus/xlphy 113 uhub/usb_linux 62 miibus/e1000phy 112 uhub/umass 61 miibus/ciphy 111 ohci/usbus 110 uhci/usbus 109 ehci/usbus 108 at91_udp/usbus 107 uss820/usbus 106 pci/uhci 60 miibus/brgphy 59 miibus/bmtphy 105 pci/ohci 58 miibus/axphy 104 pci/ehci 57 miibus/atphy 56 miibus/amphy 55 miibus/acphy 54 mfi/mfid 53 pci/mfi 103 pci/uart 102 isa/uart 101 acpi/uart 23 acpi/acpi_isab 29 cpu/acpi_perf 100 midi 18 acpi/acpi_button 28 pci/acpi_pcib 52 mem 99 sound 27 acpi/acpi_pcib 22 acpi/acpi_hpet 20 acpi/cpu 16 nexus/acpi 17 acpi/acpi_acad 50 kbdmux 49 pci/ichsmb 48 ichsmb/smbus 138 cpu/cpufreq 37 pci/ahci 36 atapci/ahci 35 ahci/ahcich 26 acpi/acpi_pci_link 34 acpi/acpi_timer 150 nfslock 33 cpu/acpi_throttle 32 acpi/acpi_tz 19 acpi/acpi_cmbat 47 firewire/sbp 46 pci/fwohci 134 isab/isa 133 eisab/isa 126 g_vfs 51 g_md 156 g_class 128 g_part 139 rootbus 125 g_disk 124 g_dev 127 g_label 144 ether 183 x86bios 2 3 0xffffffff8087a000 4b7f0 linux.ko (/boot/kernel/linux.ko) Contains modules: Id Name 1 linuxelf 3 1 0xffffffff808c6000 dbb8 if_re.ko (/boot/kernel/if_re.ko) Contains modules: Id Name 3 re/miibus 2 pci/re 4 1 0xffffffff808d4000 2bad8 kqemu.ko (/boot/modules/kqemu.ko) Contains modules: Id Name 4 kqemu 5 1 0xffffffff80900000 d451a0 nvidia.ko (/boot/modules/nvidia.ko) Contains modules: Id Name 5 vgapci/nvidia 6 1 0xffffffff81812000 4dd0 linprocfs.ko (/boot/kernel/linprocfs.ko) Contains modules: Id Name 196 linprocfs 7 1 0xffffffff81817000 2c2 blank_saver.ko (/boot/kernel/blank_saver.ko) Contains modules: Id Name 197 blank_saver >How-To-Repeat: 1. Get the output from glabel status 2. Play a DVD via vlc. 3. Get the output again from glabel status. 4. Stop DVD and eject. 5. Get the output again from glabel status. 1. will show that the label doesn't exist on a freshly booted system. 3. will show that the label exists because the DVD is in use and plugged into geom. 5. will show that the label still exists [but shouldn't because it's been disconnected from the system and geom(4)]. >Fix: >Release-Note: >Audit-Trail: From: Garrett Cooper To: bug-followup Cc: geom@freebsd.org, mav@freebsd.org Subject: Re: kern/145818: [geom] geom_stat_open showing cached information for non-present iso Date: Sun, 18 Apr 2010 18:48:59 -0700 I did some more tracking down of this issue and the problem is with the cached data being reported by devstat(9) -- somehow when the device is being detached it's not properly reporting that it needs to be removed in geom(4). I'm a bit stuck after that, but it does appear to be a communication issue between [atapi]cam(4) and geom(4). Thanks, -Garrett Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: linimon Responsible-Changed-When: Mon Apr 19 05:29:09 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=145818 From: Andriy Gapon To: bug-followup@FreeBSD.org, gcooper@FreeBSD.org, freebsd-geom@FreeBSD.org Cc: Subject: Re: kern/145818: [geom] geom_stat_open showing cached information for non-present iso Date: Mon, 19 Apr 2010 16:54:27 +0300 In my opinion this is an issue of CAM peripheral disk drivers (and most probably all other disk drivers) not communicating media change events even when those events are readily known to the drivers. One simple is example is CDIOCEJECT/CDIOCCLOSE ioctls of cd(4). Other possibilities for detecting media change: handle SCSI ASC 28h ("NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED"); poll for media removal/change; poll for CD drive eject button precesses (things that hald does in userland). AFAICS, currently there is no abstraction to pass media change events from disk layer to GEOM. E.g. something like disk_media_changed() that would call g_spoil or post g_new_provider_event to trigger re-taste as appropriate. Sounds easy, but the devil is in the details, there might be some locking/layering concerns. But, OTOH, we do this kind of things in g_access, I don't see why we couldn't do them in disk drivers. -- Andriy Gapon >Unformatted: