Date: Thu, 10 Dec 2015 21:43:54 +0000 From: "Pokala, Ravi" <rpokala@panasas.com> To: Alan Somers <asomers@freebsd.org>, Ravi Pokala <rpokala@mac.com> Cc: Kevin Bowling <kevin.bowling@kev009.com>, "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org> Subject: Re: Accessing static drive info w/o ATA identify and lockup with camcontrol identify Message-ID: <7F867A13-89E5-40C1-B13C-AA989F7B2A45@panasas.com> In-Reply-To: <CAOtMX2gLyzyJOuj3Z1yOwZtcwGv-YHFk=5Lo-cU=pMRR5_j%2BUA@mail.gmail.com> References: <80BB5907-CC31-4F06-9C70-E6F7834FF28E@panasas.com> <CAK7dMtBmMdOMs4vdPy0otprfWTVREJCyrVaeVtXj2gw-3BFQGA@mail.gmail.com> <E7955294-60BE-45B9-9197-33767EBD3DEA@panasas.com> <CAOtMX2je1o26g8DXjUopJZOT=uSqEnWz=rWe4a02vJRHShWdjg@mail.gmail.com> <CF44FCC6-F16A-448B-A1F4-0CFD84AD85D5@panasas.com> <CAOtMX2gLyzyJOuj3Z1yOwZtcwGv-YHFk=5Lo-cU=pMRR5_j%2BUA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message-----
From: <asomers@gmail.com> on behalf of Alan Somers <asomers@freebsd.org>
Date: 2015-12-10, Thursday at 09:13
To: Ravi Pokala <rpokala@mac.com>
Cc: Kevin Bowling <kevin.bowling@kev009.com>, "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>
Subject: Re: Accessing static drive info w/o ATA identify and lockup with camcontrol identify
>Actually, it is possible to get that info in userland, though a little
>Awkward.
Oh sure. For various historical reasons, I get ident information by passing an IDENTIFY_DEVICE command from userland via passthrough ioctl, then extract what I need from there. It's a heavy hammer, but it works.
>You can do 'cam_open_device("da13")' to get a struct
>cam_device. Getting the ccb_getdev is harder though. Look at
>get_cgd() from camcontrol.c. Even though it looks like it's sending a
>CCB, the CCB actually gets processed by CAM and doesn't result in any
>I/O hitting the disk.
Yeah, I saw that when I was looking at this this morning. It looks like there are quite a few CAM ioctls which just return information that's already in the kernel, without sending any commands to any devices.
-Ravi
>-Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7F867A13-89E5-40C1-B13C-AA989F7B2A45>
