Date: Mon, 30 Jan 2017 11:33:08 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-geom@FreeBSD.org Subject: Re: g_disk_done() vs a destroyed disk Message-ID: <8d0093d9-759b-7674-650d-4caff1bc29a6@FreeBSD.org> In-Reply-To: <33960.1485609820@critter.freebsd.dk> References: <cba9c9bf-97ad-e3ae-e209-ea91e49b5822@FreeBSD.org> <31395.1485554104@critter.freebsd.dk> <8de79017-f0b0-c86a-93c5-65be4d97b21c@FreeBSD.org> <33960.1485609820@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 28/01/2017 15:23, Poul-Henning Kamp wrote: > -------- > In message <8de79017-f0b0-c86a-93c5-65be4d97b21c@FreeBSD.org>, Andriy Gapon wri > tes: > >> So, the correct sequence should be: >> - call disk_gone() to prevent new I/O >> - handle all in-flight I/O >> - call disk_destroy() >> Is that right? > > exactly! Thank you! And, just in case, I am seeing this problem with mfi driver. It uses disk(9) API directly to represent disks behind the controller. It seems that we have a class of such drivers and probably all of them are affected. Here is a list of files where I see disk_destroy, but no disk_gone: /usr/src/sys/dev/mlx/mlx_disk.c /usr/src/sys/dev/aac/aac_disk.c /usr/src/sys/dev/twe/twe_freebsd.c /usr/src/sys/dev/ips/ips_disk.c /usr/src/sys/dev/ida/ida_disk.c /usr/src/sys/dev/mfi/mfi_syspd.c /usr/src/sys/dev/mfi/mfi_disk.c /usr/src/sys/dev/cfi/cfi_disk.c /usr/src/sys/dev/amr/amr_disk.c The list is not complete. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8d0093d9-759b-7674-650d-4caff1bc29a6>