All of lore.kernel.org
 help / color / mirror / Atom feed
* [Announce] sg3_utils-1.27 available
@ 2009-04-12  2:33 Douglas Gilbert
  2009-04-12  3:24 ` Mr. James W. Laferriere
  0 siblings, 1 reply; 4+ messages in thread
From: Douglas Gilbert @ 2009-04-12  2:33 UTC (permalink / raw)
  To: SCSI development list
  Cc: Dan Horák, Eric Schwartz, robbat2,
	xiao li - Sun Microsystems - Beijing China, linux-kernel

sg3_utils is a package of command line utilities for sending
SCSI and some ATA commands to devices. This package targets
the linux kernel (lk) 2.6 and lk 2.4 series. Ported to FreeBSD,
Tru64, Solaris, and Windows (cygwin and mingw).

This version adds one new utility: sg_write_same. Various
changes made by www.t10.org since June 2008 are reflected
in this version. Thin provisioning support is new and more
support has been added for large sector sizes. The Linux
port adds support for bsg devices. Copy of ChangeLog below.

Note that the web site has changed since the last release.

For an overview of sg3_utils and downloads see this page:
http://sg.danny.cz/sg/sg3_utils.html
The sg_dd utility has its own page at:
http://sg.danny.cz/sg/sg_dd.html
The SG_IO ioctl is discussed at:
http://sg.danny.cz/sg/sg_io.html
A full changelog can be found at:
http://sg.danny.cz/sg/p/sg3_utils.ChangeLog

A release announcement has been sent to freshmeat.net .
[Given the current state of freshmeat.net I have no
idea whether that was successful. My sg3_utils and
sg_utils projects were mashed up together.]

Changelog for sg3_utils-1.27 [20090411] [svn: r250]
   - sg_write_same: new utility: 10, 16 and 32 byte cdb variants
   - sg_inq: sync version descriptors with spc4r18
     - add power condition VPD page
     - expand block limits VPD page (sbc3r18)
   - sg_vpd: add power condition VPD page
     - expand block limits VPD page (sbc3r18)
   - sg_map26: fix for lk 2.6.26 when CONFIG_SYSFS_DEPRECATED_V2
     is not defined
     - output cdb when verbose option given
     - correct tape minors >= 32
   - sg_dd: flock flag (does LOCK_EX|LOCK_NB)
     - switch open on input for sg device nodes: first open
       read-write and if that fails try opening read-only
     - experiment with of2=OFILE2; add conv=sparse
     - use posix_fadvise() to defeat caching of normal+block files
       when new 'nocache' flag given
     - sg_dd copied to own package called ddpt
   - sg_dd, sgm_dd, sgp_dd: accept 'count=-1' for calculate count,
     accept '-V' for version string
   - sg_get_config: add OSSC feature [mmc6r02]
   - sg_modes: add ATA power condition mode page
   - sg_logs: protocol specific (SAS) lpage sync to sas2r15
     - power condition transitions lpage (added in spc4r18)
     - extra parameters for start-stop cycle counter lpage
   - sg_format: add '--fmtpinfo=' and '--pie=' options (sbc3r18)
   - sg_readcap: more protection + thin provisioning (sbc3r18)
     - add a '--16' option for 16 byte cdb version
   - sg_persist: code clean up
     - allow '--transport-id=' argument to use space as separator
     - add '--alloc-length=' argument
   - sg_scan: (win32) new format, scsi adapter scan optional
   - sginfo: fix crash when 1024 sg device nodes (or more)
   - sg_ses: allow '--data=' argument to use space as separator
   - sg_senddiag: allow '--raw=' argument to use space as separator
   - sg_reassign: allow '--address=' argument to use space as
     separator
   - sg_wr_mode: allow '--contents=' and '--mask=' arguments to
     use space as separator
   - sg3_utils.spec: correction to configure call
   - sg_pt: add scsi_pt_open_device_flags() call
     - add scsi_pt_version() and clear_scsi_pt_obj() calls
     - clear os_err at start of do_scsi_pt()
     - add linux bsg support via runtime detection
   - sg_cmds: add sg_cmds_open_device_flags()
   - sg_cmds_extra: sg_ll_format_unit: remove rto_req argument,
     the expanded fmtpinfo argument subsumes it.
   - clearer split between Linux and Windows only code and doc
   - automake tools: change to what Ubuntu 8.10 provides
     - Ubuntu 8.10 libtool problems -> Debian 4.0

Changelog for sg3_utils-1.26 [20080625] [svn: r183]
....

Doug Gilbert

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

* Re: [Announce] sg3_utils-1.27 available
  2009-04-12  2:33 [Announce] sg3_utils-1.27 available Douglas Gilbert
@ 2009-04-12  3:24 ` Mr. James W. Laferriere
  2009-04-13  2:53   ` Douglas Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Mr. James W. Laferriere @ 2009-04-12  3:24 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: SCSI development list

 	Hello Doug ,  I thought sometime ago I'd mentioned the lack of support 
for device name(actuall filename) expansion in these tools .
 	I am aware that a simple 'for do' loop would acomplish the same thing 
but that requires writing a script/function in order to do something that 
bash/ksh/.../??? has had available for quite sometime now .
 	Would you please entertain the request to add the ability to use shell 
expansion of file expansion in the sg3 tools ?

 		Tia ,  JimL

$ sudo src/sginfo  /dev/sg[0-5]
INQUIRY response (cmd: 0x12)
----------------------------
Device Type                        0
Vendor:                    SEAGATE
Product:                   ST118273LW
Revision level:            6246

 	Only gives me device sg0 .

-- 
+------------------------------------------------------------------+
| James   W.   Laferriere | System    Techniques | Give me VMS     |
| Network&System Engineer | 2133    McCullam Ave |  Give me Linux  |
| babydr@baby-dragons.com | Fairbanks, AK. 99701 |   only  on  AXP |
+------------------------------------------------------------------+

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

* Re: [Announce] sg3_utils-1.27 available
  2009-04-12  3:24 ` Mr. James W. Laferriere
@ 2009-04-13  2:53   ` Douglas Gilbert
  2009-04-13  4:08     ` Mr. James W. Laferriere
  0 siblings, 1 reply; 4+ messages in thread
From: Douglas Gilbert @ 2009-04-13  2:53 UTC (permalink / raw)
  To: Mr. James W. Laferriere; +Cc: SCSI development list

Mr. James W. Laferriere wrote:
>     Hello Doug ,  I thought sometime ago I'd mentioned the lack of 
> support for device name(actuall filename) expansion in these tools .
>     I am aware that a simple 'for do' loop would acomplish the same 
> thing but that requires writing a script/function in order to do 
> something that bash/ksh/.../??? has had available for quite sometime now .
>     Would you please entertain the request to add the ability to use 
> shell expansion of file expansion in the sg3 tools ?

Jim,
sginfo is particularly difficult due to its syntax:
    sginfo [OPTIONS] [DEVICE] [REPLACEMENT_PARAMETERS]

In the worst case it would be hard to distinguish
between an additional DEVICE and the replacement
parameters. As noted in its man page sginfo is a port
of Eric Youngdale's scsiinfo utility. I regard sginfo as
in legacy mode and suggest people use sdparm instead.

And sdparm does what you want, its syntax is:
    sdparm [OPTIONS] DEVICE [DEVICE...]
That was done in response to a request from you!

Currently all the utilities in sg3_utils only support
one device. In the sg3_utils/scripts directory are bash
script examples, some of which do want you want.
Even after cleaning up the option processing in sg3_utils
with getopt_long() it only takes a small flourish to
cause problems if multiple device names are allowed. For
example, sg_start can be used to spin down a disk with
either:
     sg_start --stop /dev/sdc
     sg_start 0 /dev/sdc
Now the second invocation becomes ambiguous if multiple
device names are allowed and there is a device name called
"0" in the current directory.

Some utilities are already dangerous, even when they look
safe. Allowing multiple file names compounds the danger.
For example, some SCSI commands are quite creative with
their use of zero. If multiple devices were allowed, do
not try this:
   sg_write_same --num=0 /dev/sd*


Doug Gilbert


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

* Re: [Announce] sg3_utils-1.27 available
  2009-04-13  2:53   ` Douglas Gilbert
@ 2009-04-13  4:08     ` Mr. James W. Laferriere
  0 siblings, 0 replies; 4+ messages in thread
From: Mr. James W. Laferriere @ 2009-04-13  4:08 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: SCSI development list

 	Hello Doug ,

On Sun, 12 Apr 2009, Douglas Gilbert wrote:
> Mr. James W. Laferriere wrote:
>>     Hello Doug ,  I thought sometime ago I'd mentioned the lack of support 
>> for device name(actuall filename) expansion in these tools .
>>     I am aware that a simple 'for do' loop would acomplish the same thing 
>> but that requires writing a script/function in order to do something that 
>> bash/ksh/.../??? has had available for quite sometime now .
>>     Would you please entertain the request to add the ability to use shell 
>> expansion of file expansion in the sg3 tools ?
>
> Jim,
> sginfo is particularly difficult due to its syntax:
>   sginfo [OPTIONS] [DEVICE] [REPLACEMENT_PARAMETERS]
>
> In the worst case it would be hard to distinguish
> between an additional DEVICE and the replacement
> parameters. As noted in its man page sginfo is a port
> of Eric Youngdale's scsiinfo utility. I regard sginfo as
> in legacy mode and suggest people use sdparm instead.

 	Ok ,  I see the problem(s) .

> And sdparm does what you want, its syntax is:
>   sdparm [OPTIONS] DEVICE [DEVICE...]
> That was done in response to a request from you!

 	I thought we had discussed this sometime ago ,  Just getting early 
old'timers :) .  It helped me very much in a previous life .

> Currently all the utilities in sg3_utils only support
> one device. In the sg3_utils/scripts directory are bash
> script examples, some of which do want you want.
> Even after cleaning up the option processing in sg3_utils
> with getopt_long() it only takes a small flourish to
> cause problems if multiple device names are allowed. For
> example, sg_start can be used to spin down a disk with
> either:
>    sg_start --stop /dev/sdc
>    sg_start 0 /dev/sdc
> Now the second invocation becomes ambiguous if multiple
> device names are allowed and there is a device name called
> "0" in the current directory.
>
> Some utilities are already dangerous, even when they look
> safe. Allowing multiple file names compounds the danger.
> For example, some SCSI commands are quite creative with
> their use of zero. If multiple devices were allowed, do
> not try this:
>  sg_write_same --num=0 /dev/sd*

 	Same as above ,  I'm finally seeing the light .

> Doug Gilbert
 		Tnx ,  JimL
-- 
+------------------------------------------------------------------+
| James   W.   Laferriere | System    Techniques | Give me VMS     |
| Network&System Engineer | 2133    McCullam Ave |  Give me Linux  |
| babydr@baby-dragons.com | Fairbanks, AK. 99701 |   only  on  AXP |
+------------------------------------------------------------------+

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

end of thread, other threads:[~2009-04-13  4:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-12  2:33 [Announce] sg3_utils-1.27 available Douglas Gilbert
2009-04-12  3:24 ` Mr. James W. Laferriere
2009-04-13  2:53   ` Douglas Gilbert
2009-04-13  4:08     ` Mr. James W. Laferriere

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.