public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* SCSI passthrough ioctl calls vs. sd/sg devices
@ 2004-04-21 22:04 Lee Xing
  2004-04-24  4:06 ` Douglas Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Xing @ 2004-04-21 22:04 UTC (permalink / raw)
  To: linux-scsi

Hi,

I would appreciate it if some one could clarify this.  It's a bit confusing.

<<The Linux SCSI Generic (sg) HOWTO>> page 2 says "The sg driver permits user applications to send SCSI commands to devices that understand them.  SCSI commands are 6, 10, 12 or 16 bytes long.  The SCSI disk driver (sd), once device initialization is complete, only sends SCSI READ and WRITE commands."

<<The Linux 2.4 SCSI subsystem HOWTO>> page 3 says "Sg is a SCSI command pass through device that uses a char device interface.  General purpose Linux commands should not be used on sg devices."

My questions are:

- looks like SCSI passthrough ioctl calls can only apply 
  to sg devices.  Is it right, and can we apply SCSI
  passthrough ioctl calls to sd devices as well?
- what are the so-called "General purpose Linux commands"?
  Are they read()/write() or 'mount' / 'dd' or something else?

What should we do if we need to 'mount' a file system on a disk and also need to issue SCSI passthrough ioctl calls to the same disk?  Maybe we should use both sd and sg (i.e. mount the file system to /dev/sda, and issue SCSI passthrough ioctl calls to /dev/sg0 that maps to the same physical disk)?  'mount' doesn't work on sg devices as I was told earlier.

Many thanks,


Lee



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-25  6:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-21 22:04 SCSI passthrough ioctl calls vs. sd/sg devices Lee Xing
2004-04-24  4:06 ` Douglas Gilbert
2004-04-24  6:58   ` Kai Makisara
2004-04-24 12:42     ` Willem Riede
2004-04-25  6:49       ` Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox