aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2020-07-17 03:50:13 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2020-07-17 03:50:13 +0000
commit5d21382d1a81a0aa3da2c27235171a8b88357c00 (patch)
treea322cc5b5e82618b7358ec89113e5f3c72ede8d8
parentec46929f407fa5cc5fd1b276d407c17d1d70c2e5 (diff)
downloadsg3_utils-5d21382d1a81a0aa3da2c27235171a8b88357c00.tar.gz
testing: remove master-slave terminology for sgv4; remove space from end of source lines for git-svn
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@856 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--COPYING2
-rw-r--r--COVERAGE2
-rw-r--r--ChangeLog5
-rw-r--r--README.sg_start2
-rw-r--r--doc/sg_sat_phy_event.816
-rw-r--r--doc/sg_scan.8.win3216
-rw-r--r--doc/sgp_dd.84
-rw-r--r--examples/Makefile6
-rw-r--r--examples/Makefile.freebsd2
-rw-r--r--examples/sg_unmap_example.txt16
-rw-r--r--examples/transport_ids.txt2
-rw-r--r--lib/Makefile.am2
-rwxr-xr-xscripts/scsi_satl8
-rw-r--r--testing/Makefile18
-rw-r--r--testing/Makefile.cyg12
-rw-r--r--testing/Makefile.freebsd2
-rw-r--r--testing/sg_mrq_dd.cpp42
-rw-r--r--testing/sg_tst_ioctl.c30
-rw-r--r--testing/sgh_dd.cpp58
-rw-r--r--testing/uapi_sg.h18
-rw-r--r--utils/README2
21 files changed, 135 insertions, 130 deletions
diff --git a/COPYING b/COPYING
index 3ef2d535..6371eba1 100644
--- a/COPYING
+++ b/COPYING
@@ -1,5 +1,5 @@
-Upstream Authors: Douglas Gilbert <dgilbert at interlog dot com>,
+Upstream Authors: Douglas Gilbert <dgilbert at interlog dot com>,
Bruce Allen <ballen at gravity dot phys dot uwm dot edu>,
Peter Allworth <linsol at zeta dot org dot au>,
James Bottomley <jejb at parisc-linux dot org>,
diff --git a/COVERAGE b/COVERAGE
index 830bfe05..f59f047e 100644
--- a/COVERAGE
+++ b/COVERAGE
@@ -141,7 +141,7 @@ NVMe command sg3_utils utilities that use this NVMe command
Identify sg_inq
SES Read sg_senddiag, sg_ses (NVME-MI command)
SES Write sg_senddiag, sg_ses (NVME-MI command)
-Device self-test [SNTL of SEND DIAGNOSTIC] sg_senddiag
+Device self-test [SNTL of SEND DIAGNOSTIC] sg_senddiag
Get features(power management) [SNTL of REQUEST SENSE] sg_requests
Read [SCSI READ(10) -->SNTL--> Read]
[SCSI READ(16) -->SNTL--> Read]
diff --git a/ChangeLog b/ChangeLog
index b9de3c75..f78cd94c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.46 [20200713] [svn: r855]
+Changelog for sg3_utils-1.46 [20200716] [svn: r856]
- sg_rep_pip: report new provisioning initialization pattern cmd
- sg_dd: separate category for miscompare errors
- sg_get_elem_status: add ralwd bit sbc4r20a
@@ -19,9 +19,10 @@ Changelog for sg3_utils-1.46 [20200713] [svn: r855]
- wire cache mpage's WCE to nvme 'volatile write cache'
- sg_lib: reprint cdb with illegal request sense key
- asc/ascq match asc-num.txt @t10 20200708 [spc6r02]
+ - remove space from end of source lines for git-svn
- testing/sg_mrq_testing: new, for blocking mrq usage
- testing/sgs_dd: add evfd flags and eventfd processing
- - testing/sgh_dd: various fixes
+ - testing: remove master-slave terminology for sgv4
Changelog for sg3_utils-1.45 [20200229] [svn: r843]
- sg_get_elem_status: new utility [sbc4r16]
diff --git a/README.sg_start b/README.sg_start
index c4b663f8..91366875 100644
--- a/README.sg_start
+++ b/README.sg_start
@@ -16,7 +16,7 @@ I use it in my shutdown script at the end (before the poweroff command):
if test -x /bin/sg_start; then
if test "`basename $command`" = "reboot"; then
for no in $SG_SHUT_NOS;
- do /bin/sg_start /dev/sg$no -s >/dev/null 2>&1;
+ do /bin/sg_start /dev/sg$no -s >/dev/null 2>&1;
done
else
for no in $SG_SHUT_NOS;
diff --git a/doc/sg_sat_phy_event.8 b/doc/sg_sat_phy_event.8
index 8fcf80d9..8a2f14ae 100644
--- a/doc/sg_sat_phy_event.8
+++ b/doc/sg_sat_phy_event.8
@@ -1,4 +1,4 @@
-.TH SG_SAT_PHY_EVENT "8" "January 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_SAT_PHY_EVENT "8" "July 2020" "sg3_utils\-1.46" SG3_UTILS
.SH NAME
sg_sat_phy_event \- use ATA READ LOG EXT via a SAT pass\-through to fetch
SATA phy event counters
@@ -17,12 +17,12 @@ command directly to the \fIDEVICE\fR, are sent via a SCSI transport which is
assumed to contain a SCSI to ATA Translation (SAT) Layer (SATL). The SATL may
be in an operating system driver, in host bus adapter firmware or in some
external enclosure.
-.PP
-The SAT standard (SAT ANSI INCITS 431\-2007, prior draft: sat\-r09.pdf at
-www.t10.org) defines two SCSI "ATA PASS\-THROUGH" commands: one using a 16
-byte "cdb" and the other with a 12 byte cdb. This utility defaults to using
-the 16 byte cdb variant. SAT\-2 is also a standard: SAT\-2 ANSI INCITS
-465\-2010 and the draft prior to that is sat2r09.pdf . The SAT-3 project has
+.PP
+The SAT standard (SAT ANSI INCITS 431\-2007, prior draft: sat\-r09.pdf at
+www.t10.org) defines two SCSI "ATA PASS\-THROUGH" commands: one using a 16
+byte "cdb" and the other with a 12 byte cdb. This utility defaults to using
+the 16 byte cdb variant. SAT\-2 is also a standard: SAT\-2 ANSI INCITS
+465\-2010 and the draft prior to that is sat2r09.pdf . The SAT-3 project has
started and the most recent draft is sat3r01.pdf .
.SH OPTIONS
Arguments to long options are mandatory for short options as well.
@@ -100,7 +100,7 @@ Written by Douglas Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2006\-2018 Douglas Gilbert
+Copyright \(co 2006\-2020 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/doc/sg_scan.8.win32 b/doc/sg_scan.8.win32
index 84cc38b0..ee20e6c0 100644
--- a/doc/sg_scan.8.win32
+++ b/doc/sg_scan.8.win32
@@ -21,7 +21,7 @@ problems.
.PP
There is an optional SCSI adapter scan which may find additional storage
devices other than the ones listed above. An example is a SCSI Enclosure
-Services (SES) device typically found in disk arrays.
+Services (SES) device typically found in disk arrays.
.PP
Storage and related devices can have several device names in Windows.
Probably the most common in the volume name (e.g. "D:"). There is also
@@ -125,9 +125,9 @@ recognised by Windows.
.PP
# sg_scan
.br
-PD0 [C] FUJITSU MHY2160BH 0000
+PD0 [C] FUJITSU MHY2160BH 0000
.br
-PD1 [DF] WD 2500BEV External 1.05 WD\-WXE90
+PD1 [DF] WD 2500BEV External 1.05 WD\-WXE90
.br
CDROM0 [E] MATSHITA DVD/CDRW UJDA775 CB03
.PP
@@ -136,7 +136,7 @@ and there is a "Sata" bus type.
.PP
# sg_scan \-b
.br
-PD0 [C] <Ata > FUJITSU MHY2160BH 0000
+PD0 [C] <Ata > FUJITSU MHY2160BH 0000
.br
PD1 [DF] <Usb > WD 2500BEV External 1.05 WD\-WXE90
.br
@@ -146,13 +146,13 @@ Now request a SCSI adapter scan as well.
.PP
# sg_scan \-b \-s
.br
-PD0 [C] <Ata > FUJITSU MHY2160BH 0000
+PD0 [C] <Ata > FUJITSU MHY2160BH 0000
.br
-PD1 [DF] <Usb > WD 2500BEV External 1.05 WD\-WXE90
+PD1 [DF] <Usb > WD 2500BEV External 1.05 WD\-WXE90
.br
-CDROM0 [E] <Atapi> MATSHITA DVD/CDRW UJDA775 CB03
+CDROM0 [E] <Atapi> MATSHITA DVD/CDRW UJDA775 CB03
.br
-
+
.br
SCSI0:0,0,0 claimed=1 pdt=0h FUJITSU MHY2160BH 0000
.br
diff --git a/doc/sgp_dd.8 b/doc/sgp_dd.8
index 62a065bf..a8899464 100644
--- a/doc/sgp_dd.8
+++ b/doc/sgp_dd.8
@@ -244,8 +244,8 @@ Raw device partition information can often be found with
.B fdisk(8)
[the "\-ul" argument is useful in this respect].
.PP
-Various numeric arguments (e.g. \fISKIP\fR) may include multiplicative
-suffixes or be given in hexadecimal. See the "NUMERIC ARGUMENTS" section
+Various numeric arguments (e.g. \fISKIP\fR) may include multiplicative
+suffixes or be given in hexadecimal. See the "NUMERIC ARGUMENTS" section
in the sg3_utils(8) man page.
.PP
The \fICOUNT\fR, \fISKIP\fR and \fISEEK\fR arguments can take 64 bit
diff --git a/examples/Makefile b/examples/Makefile
index 9c1f64e9..d8156744 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -24,7 +24,7 @@ EXTRAS = sgq_dd
BSG_EXTRAS =
-MAN_PGS =
+MAN_PGS =
MAN_PREF = man8
LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
@@ -71,7 +71,7 @@ sg_simple16: sg_simple16.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
scsi_inquiry: scsi_inquiry.o
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
sg_excl: sg_excl.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
@@ -95,7 +95,7 @@ sg_sat_smart_rd_data: sg_sat_smart_rd_data.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
sgq_dd: sgq_dd.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
install: $(EXECS)
install -d $(INSTDIR)
diff --git a/examples/Makefile.freebsd b/examples/Makefile.freebsd
index fda94c37..d983736d 100644
--- a/examples/Makefile.freebsd
+++ b/examples/Makefile.freebsd
@@ -18,7 +18,7 @@ EXECS = sg_simple5
# EXTRAS = sgq_dd
-MAN_PGS =
+MAN_PGS =
MAN_PREF = man8
OS_FLAGS = -DSG_LIB_FREEBSD
diff --git a/examples/sg_unmap_example.txt b/examples/sg_unmap_example.txt
index 1a5f44d0..2b07dbae 100644
--- a/examples/sg_unmap_example.txt
+++ b/examples/sg_unmap_example.txt
@@ -19,20 +19,20 @@
# Example invocation:
# $ sg_unmap --in=../examples/sg_unmap_example.txt -vv /dev/sdc
# open /dev/sg2 with flags=0x802
-# unmap cdb: 42 00 00 00 00 00 00 00 58 00
+# unmap cdb: 42 00 00 00 00 00 00 00 58 00
# unmap parameter list:
-# 00 56 00 50 00 00 00 00 00 00 00 00 12 34 56 77
-# 00 00 00 01 00 00 00 00 00 00 00 00 12 34 56 78
-# 00 00 00 02 00 00 00 00 00 00 00 00 12 34 00 00
-# 00 00 0d 05 00 00 00 00 00 00 00 5a 5a 5a 5a 5a
-# 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 a5 a5
+# 00 56 00 50 00 00 00 00 00 00 00 00 12 34 56 77
+# 00 00 00 01 00 00 00 00 00 00 00 00 12 34 56 78
+# 00 00 00 02 00 00 00 00 00 00 00 00 12 34 00 00
+# 00 00 0d 05 00 00 00 00 00 00 00 5a 5a 5a 5a 5a
+# 00 00 00 00 00 00 00 00 00 00 00 00 00 a5 a5 a5
# 00 00 00 07 00 00 00 00
# sg_cmds_process_resp: slen=18
# unmap: Fixed format, current; Sense key: Illegal Request
# Additional sense: Invalid command operation code
# Raw sense data (in hex):
-# 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
-# 00 00
+# 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
+# 00 00
# UNMAP not supported
#
# --------------------------------------------------------
diff --git a/examples/transport_ids.txt b/examples/transport_ids.txt
index a63374da..b61581d8 100644
--- a/examples/transport_ids.txt
+++ b/examples/transport_ids.txt
@@ -26,6 +26,6 @@ sas,500605b00006f261
# Leading spaces and tabs before a '#' are ok.
-
+
# dpg 20090824
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9c4867e8..7fa9dc73 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -5,7 +5,7 @@ libsgutils2_la_SOURCES = \
sg_cmds_basic2.c \
sg_cmds_extra.c \
sg_cmds_mmc.c \
- sg_pt_common.c
+ sg_pt_common.c
if OS_LINUX
libsgutils2_la_SOURCES += \
diff --git a/scripts/scsi_satl b/scripts/scsi_satl
index c79249bc..08042ae3 100755
--- a/scripts/scsi_satl
+++ b/scripts/scsi_satl
@@ -15,9 +15,9 @@
# INQUIRY (VPD: 0x83) Device identification VPD page
# INQUIRY (VPD: 0x89) ATA Information VPD page
# REPORT LUNS SPC-3, SPC-4 (hardly mentioned in sat-r08c)
-# TEST UNIT READY
-# REQUEST SENSE
-# SEND DIAGNOSTIC default self test
+# TEST UNIT READY
+# REQUEST SENSE
+# SEND DIAGNOSTIC default self test
# MODE SENSE(10) draft unclear which mode pages, so ask for all
# ATA PASS THROUGH(16) send IDENTIFY DEVICE command. Assume non-packet
# device, if packet device add "-p" option
@@ -76,7 +76,7 @@ if [ $# -lt 1 ]
then
usage
exit 1
-fi
+fi
for command in "sg_inq" "sg_vpd" "sg_vpd -p di" "sg_vpd -p ai" "sg_luns" \
"sg_turs" "sg_requests -s" "sg_senddiag -t" "sg_modes -a" \
diff --git a/testing/Makefile b/testing/Makefile
index 63176f56..dedf23a6 100644
--- a/testing/Makefile
+++ b/testing/Makefile
@@ -14,7 +14,7 @@ EXTRAS =
BSG_EXTRAS =
-MAN_PGS =
+MAN_PGS =
MAN_PREF = man8
LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
@@ -31,10 +31,10 @@ CXXLD = $(CXX)
CPPFLAGS = -iquote ../include -iquote .. -D_REENTRANT $(LARGE_FILE_FLAGS) -DHAVE_CONFIG_H -DHAVE_NVME
CXXFLAGS = -std=c++17 -pthread -ggdb -O2 -W -Wall -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS)
# CPPFLAGS = -iquote ../include -iquote .. -D_REENTRANT $(LARGE_FILE_FLAGS) -DHAVE_CONFIG_H -DHAVE_NVME -DDEBUG
-# CFLAGS = -g -O2 -W -Wall
+# CFLAGS = -g -O2 -W -Wall
CFLAGS = -ggdb -O2 -W -Wall -DDEBUG
# CFLAGS = -g -O2 -Wall -DSG_KERNEL_INCLUDES
-# CFLAGS = -g -O2 -Wall -pedantic
+# CFLAGS = -g -O2 -Wall -pedantic
# CFLAGS = -Wall -W -pedantic -std=c11 --analyze
# CFLAGS = -Wall -W -pedantic -std=c++14 -fPIC
@@ -67,29 +67,29 @@ sg_sense_test: sg_sense_test.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
sg_queue_tst: sg_queue_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
bsg_queue_tst: bsg_queue_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
sg_tst_ioctl: sg_tst_ioctl.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
# building sg_chk_asc depends on a prior successful make in ../lib
sg_chk_asc: sg_chk_asc.o ../lib/sg_lib.o ../lib/sg_lib_data.o
$(LD) -o $@ $(LDFLAGS) $^
sg_tst_nvme: sg_tst_nvme.o $(LIBFILESNEW)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
tst_sg_lib: tst_sg_lib.o ../lib/sg_lib.o ../lib/sg_lib_data.o
$(LD) -o $@ $(LDFLAGS) $^
sgs_dd: sgs_dd.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
sg_tst_bidi: sg_tst_bidi.o $(LIBFILESNEW)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
sg_tst_excl: sg_tst_excl.o $(LIBFILESNEW)
$(CXXLD) -o $@ $(LDFLAGS) -pthread $^
diff --git a/testing/Makefile.cyg b/testing/Makefile.cyg
index 058f837d..0dfbb07d 100644
--- a/testing/Makefile.cyg
+++ b/testing/Makefile.cyg
@@ -20,7 +20,7 @@ EXTRAS =
BSG_EXTRAS =
-MAN_PGS =
+MAN_PGS =
MAN_PREF = man8
LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
@@ -32,9 +32,9 @@ LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
## CC = clang++
CPPFLAGS = -iquote ../include -iquote .. -D_REENTRANT $(LARGE_FILE_FLAGS) -DHAVE_CONFIG_H -DHAVE_NVME
-CFLAGS = -g -O2 -W -Wall
+CFLAGS = -g -O2 -W -Wall
# CFLAGS = -g -O2 -Wall -DSG_KERNEL_INCLUDES
-# CFLAGS = -g -O2 -Wall -pedantic
+# CFLAGS = -g -O2 -Wall -pedantic
# CFLAGS = -Wall -W -pedantic -std=c11 --analyze
# CFLAGS = -Wall -W -pedantic -std=c++14 -fPIC
@@ -65,17 +65,17 @@ sg_sense_test: sg_sense_test.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
sg_queue_tst: sg_queue_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
bsg_queue_tst: bsg_queue_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
# building sg_chk_asc depends on a prior successful make in ../lib
sg_chk_asc: sg_chk_asc.o ../lib/sg_lib.o ../lib/sg_lib_data.o
$(LD) -o $@ $(LDFLAGS) $^
sg_tst_nvme: sg_tst_nvme.o $(LIBFILESNEW)
- $(LD) -o $@ $(LDFLAGS) $^
+ $(LD) -o $@ $(LDFLAGS) $^
tst_sg_lib: tst_sg_lib.o ../lib/sg_lib.o ../lib/sg_lib_data.o
$(LD) -o $@ $(LDFLAGS) $^
diff --git a/testing/Makefile.freebsd b/testing/Makefile.freebsd
index bba9f572..5b11cd09 100644
--- a/testing/Makefile.freebsd
+++ b/testing/Makefile.freebsd
@@ -17,7 +17,7 @@ EXECS = sg_sense_test sg_chk_asc sg_tst_nvme tst_sg_lib
EXTRAS =
-MAN_PGS =
+MAN_PGS =
MAN_PREF = man8
OS_FLAGS = -DSG_LIB_FREEBSD -DHAVE_NVME
diff --git a/testing/sg_mrq_dd.cpp b/testing/sg_mrq_dd.cpp
index 846d381a..900f45dc 100644
--- a/testing/sg_mrq_dd.cpp
+++ b/testing/sg_mrq_dd.cpp
@@ -36,7 +36,7 @@
* renamed [20181221]
*/
-static const char * version_str = "1.02 20200709";
+static const char * version_str = "1.03 20200716";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -683,8 +683,8 @@ sg_flags_str(int flags, int b_len, char * b)
if (n >= b_len)
goto fini;
}
- if (SGV4_FLAG_ORDERED_SLV & flags) { /* 0x80000 */
- n += sg_scnpr(b + n, b_len - n, "OSLV|");
+ if (SGV4_FLAG_ORDERED_WR & flags) { /* 0x80000 */
+ n += sg_scnpr(b + n, b_len - n, "OWR|");
if (n >= b_len)
goto fini;
}
@@ -802,8 +802,8 @@ fetch_sg_version(void)
have_sg_version = !!sg_version;
}
}
- if (NULL == fp)
- pr2serr("The sg driver may not be loaded\n");
+ if (NULL == fp)
+ pr2serr("The sg driver may not be loaded\n");
}
if (fp)
fclose(fp);
@@ -1107,11 +1107,12 @@ page4:
"traversal is 'safe'. So it is important to note\nthe whole "
"tree is not locked. This means for fast devices the overall\n"
"tree state may change while the traversal is occurring. For "
- "example,\nit has been observed that both the master and slave "
+ "example,\nit has been observed that both the read- and write- "
"sides of a request\nshare show they are in 'active' state "
- "which should not be possible.\nIt occurs because the master "
- "probably jumped out of active state and\nthe slave request "
- "entered it while some other nodes were being printed.\n\n");
+ "which should not be possible.\nIt occurs because the read-side "
+ "probably jumped out of active state and\nthe write-side "
+ "request entered it while some other nodes were being "
+ "printed.\n\n");
pr2serr("Busy state:\n"
"Busy state (abbreviated to 'bsy' in the /proc/scsi/sg/debug "
"output)\nis entered during request setup and completion. It "
@@ -2244,7 +2245,7 @@ sig_listen_thread(struct global_collection * clp)
}
static bool
-sg_share_prepare(int slave_wr_fd, int master_rd_fd, int id, bool vb_b)
+sg_share_prepare(int write_side_fd, int read_side_fd, int id, bool vb_b)
{
struct sg_extended_info sei;
struct sg_extended_info * seip;
@@ -2253,16 +2254,17 @@ sg_share_prepare(int slave_wr_fd, int master_rd_fd, int id, bool vb_b)
memset(seip, 0, sizeof(*seip));
seip->sei_wr_mask |= SG_SEIM_SHARE_FD;
seip->sei_rd_mask |= SG_SEIM_SHARE_FD;
- seip->share_fd = master_rd_fd;
- if (ioctl(slave_wr_fd, SG_SET_GET_EXTENDED, seip) < 0) {
+ seip->share_fd = read_side_fd;
+ if (ioctl(write_side_fd, SG_SET_GET_EXTENDED, seip) < 0) {
pr2serr_lk("tid=%d: ioctl(EXTENDED(shared_fd=%d), failed "
- "errno=%d %s\n", id, master_rd_fd, errno,
+ "errno=%d %s\n", id, read_side_fd, errno,
strerror(errno));
return false;
}
if (vb_b)
- pr2serr_lk("%s: tid=%d: ioctl(EXTENDED(shared_fd)) ok, master_fd=%d, "
- "slave_fd=%d\n", __func__, id, master_rd_fd, slave_wr_fd);
+ pr2serr_lk("%s: tid=%d: ioctl(EXTENDED(shared_fd)) ok, "
+ "read_side_fd=%d, write_side_fd=%d\n", __func__, id,
+ read_side_fd, write_side_fd);
return true;
}
@@ -2537,7 +2539,7 @@ fini:
}
close(rep->outfd);
}
- /* pass stats back to master */
+ /* pass stats back to read-side */
clp->in_rem_count -= rep->in_local_count;
clp->out_rem_count -= rep->out_local_count;
clp->in_partial += rep->in_local_partial;
@@ -2983,7 +2985,7 @@ sg_half_segment(Rq_elem * rep, scat_gath_iter & sg_it, bool is_wr,
break;
}
- /* First build the command/request for the master (READ) side */
+ /* First build the command/request for the read-side */
cdbsz = is_wr ? clp->cdbsz_out : clp->cdbsz_in;
res = sg_build_scsi_cdb(t_cdb.data(), cdbsz, num, sg_it.current_lba(),
false, is_wr, flagsp->fua, flagsp->dpo);
@@ -3384,7 +3386,7 @@ do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
break;
}
- /* First build the command/request for the master (READ) side */
+ /* First build the command/request for the read-side*/
cdbsz = clp->cdbsz_in;
res = sg_build_scsi_cdb(t_cdb.data(), cdbsz, num,
i_sg_it.current_lba(), false, false,
@@ -3408,7 +3410,7 @@ do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
t_v4p->request_extra = mrq_pack_id_base + ++rep->mrq_pack_id_off;
a_v4.push_back(t_v4);
- /* Now build the command/request for slave (WRITE or VERIFY) side */
+ /* Now build the command/request for write-side (WRITE or VERIFY) */
cdbsz = clp->cdbsz_out;
res = sg_build_scsi_cdb(t_cdb.data(), cdbsz, num,
o_sg_it.current_lba(), clp->verify, true,
@@ -3464,7 +3466,7 @@ do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
if (! (iflagsp->coe || oflagsp->coe))
ctl_v4.flags |= SGV4_FLAG_STOP_IF;
if ((! clp->verify) && clp->out_flags.order)
- ctl_v4.flags |= SGV4_FLAG_ORDERED_SLV;
+ ctl_v4.flags |= SGV4_FLAG_ORDERED_WR;
ctl_v4.dout_xferp = (uint64_t)a_v4.data(); /* request array */
ctl_v4.dout_xfer_len = a_v4.size() * sizeof(struct sg_io_v4);
ctl_v4.din_xferp = (uint64_t)a_v4.data(); /* response array */
diff --git a/testing/sg_tst_ioctl.c b/testing/sg_tst_ioctl.c
index 160fcd83..54e0d23a 100644
--- a/testing/sg_tst_ioctl.c
+++ b/testing/sg_tst_ioctl.c
@@ -60,7 +60,7 @@
* later of the Linux sg driver. */
-static const char * version_str = "Version: 1.17 20200602";
+static const char * version_str = "Version: 1.18 20200716";
#define INQ_REPLY_LEN 128
#define INQ_CMD_LEN 6
@@ -410,10 +410,10 @@ tst_extended_ioctl(const char * fnp, int sg_fd, const char * fn2p, int sg_fd2,
seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_ORPHANS;
seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_Q_TAIL;
seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_IS_SHARE;
- seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_IS_MASTER;
+ seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_IS_READ_SIDE;
seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_UNSHARE;
- seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_MASTER_FINI;
- seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_MASTER_ERR;
+ seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_READ_SIDE_FINI;
+ seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_READ_SIDE_ERR;
seip->ctl_flags_wr_mask |= SG_CTL_FLAGM_NO_DURATION;
seip->ctl_flags_rd_mask |= SG_CTL_FLAGM_NO_DURATION;
seip->ctl_flags |= SG_CTL_FLAGM_TIME_IN_NS;
@@ -450,18 +450,18 @@ tst_extended_ioctl(const char * fnp, int sg_fd, const char * fn2p, int sg_fd2,
if (SG_CTL_FLAGM_IS_SHARE & seip->ctl_flags_rd_mask)
printf(" %sIS_SHARE: %s\n", cp,
(SG_CTL_FLAGM_IS_SHARE & cflags) ? "true" : "false");
- if (SG_CTL_FLAGM_IS_MASTER & seip->ctl_flags_rd_mask)
- printf(" %sIS_MASTER: %s\n", cp,
- (SG_CTL_FLAGM_IS_MASTER & cflags) ? "true" : "false");
+ if (SG_CTL_FLAGM_IS_READ_SIDE & seip->ctl_flags_rd_mask)
+ printf(" %sIS_READ_SIDE: %s\n", cp,
+ (SG_CTL_FLAGM_IS_READ_SIDE & cflags) ? "true" : "false");
if (SG_CTL_FLAGM_UNSHARE & seip->ctl_flags_rd_mask)
printf(" %sUNSHARE: %s\n", cp,
(SG_CTL_FLAGM_UNSHARE & cflags) ? "true" : "false");
- if (SG_CTL_FLAGM_MASTER_FINI & seip->ctl_flags_rd_mask)
- printf(" %sMASTER_FINI: %s\n", cp,
- (SG_CTL_FLAGM_MASTER_FINI & cflags) ? "true" : "false");
- if (SG_CTL_FLAGM_MASTER_ERR & seip->ctl_flags_rd_mask)
- printf(" %sMASTER_ERR: %s\n", cp,
- (SG_CTL_FLAGM_MASTER_ERR & cflags) ? "true" : "false");
+ if (SG_CTL_FLAGM_READ_SIDE_FINI & seip->ctl_flags_rd_mask)
+ printf(" %sREAD_SIDE_FINI: %s\n", cp,
+ (SG_CTL_FLAGM_READ_SIDE_FINI & cflags) ? "true" : "false");
+ if (SG_CTL_FLAGM_READ_SIDE_ERR & seip->ctl_flags_rd_mask)
+ printf(" %sREAD_SIDE_ERR: %s\n", cp,
+ (SG_CTL_FLAGM_READ_SIDE_ERR & cflags) ? "true" : "false");
if (SG_CTL_FLAGM_NO_DURATION & seip->ctl_flags_rd_mask)
printf(" %sNO_DURATION: %s\n", cp,
(SG_CTL_FLAGM_NO_DURATION & cflags) ? "true" : "false");
@@ -1020,8 +1020,8 @@ main(int argc, char * argv[])
k = -k;
if (second_fname) {
if ((sg_fd2 = open(second_fname, O_RDWR)) < 0) {
- snprintf(ebuff, EBUFF_SZ,
- "%s: error opening file: %s", __func__, second_fname);
+ snprintf(ebuff, EBUFF_SZ, "%s: error opening file: %s",
+ __func__, second_fname);
perror(ebuff);
return 1;
}
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index a9cc85d3..75fc5364 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -36,7 +36,7 @@
* renamed [20181221]
*/
-static const char * version_str = "1.83 20200709";
+static const char * version_str = "1.84 20200716";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -602,8 +602,8 @@ sg_flags_str(int flags, int b_len, char * b)
if (n >= b_len)
goto fini;
}
- if (SGV4_FLAG_ORDERED_SLV & flags) { /* 0x80000 */
- n += sg_scnpr(b + n, b_len - n, "OSLV|");
+ if (SGV4_FLAG_ORDERED_WR & flags) { /* 0x80000 */
+ n += sg_scnpr(b + n, b_len - n, "OWR|");
if (n >= b_len)
goto fini;
}
@@ -900,9 +900,9 @@ usage(int pg_num)
pr2serr(" [ae=AEN[,MAEN]] [bpt=BPT] [cdbsz=6|10|12|16] "
"[coe=0|1]\n"
" [dio=0|1] [elemsz_kb=ESK] [fail_mask=FM] "
- "[fua=0|1|2|3]\n"
+ "[fua=0|1|2|3]\n"
" [mrq=[I|O,]NRQS[,C]] [noshare=0|1] "
- "[of2=OFILE2]\n"
+ "[of2=OFILE2]\n"
" [ofreg=OFREG] [ofsplit=OSP] [sync=0|1] [thr=THR] "
"[time=0|1]\n"
" [unshare=1|0] [verbose=VERB] [--dry-run] "
@@ -1041,8 +1041,8 @@ page3:
"file\n"
" descriptors (def: each threads has own file "
"descriptors)\n"
- " swait slave wait: issue WRITE on OFILE before READ "
- "is finished;\n"
+ " swait slave wait: action under review, treat as "
+ "dummy;\n"
" [oflag only] and IFILE and OFILE must be sg "
"devices\n"
" v3 use v3 sg interface (def: v3 unless sg driver "
@@ -1077,11 +1077,12 @@ page4:
"traversal is 'safe'. So it is important to note\nthe whole "
"tree is not locked. This means for fast devices the overall\n"
"tree state may change while the traversal is occurring. For "
- "example,\nit has been observed that both the master and slave "
+ "example,\nit has been observed that both the read- and write- "
"sides of a request\nshare show they are in 'active' state "
- "which should not be possible.\nIt occurs because the master "
- "probably jumped out of active state and\nthe slave request "
- "entered it while some other nodes were being printed.\n\n");
+ "which should not be possible.\nIt occurs because the read-"
+ "sie probably jumped out of active state and\nthe write-side "
+ "request entered it while some other nodes were being "
+ "printed.\n\n");
pr2serr("Busy state:\n"
"Busy state (abbreviated to 'bsy' in the /proc/scsi/sg/debug "
"output)\nis entered during request setup and completion. It "
@@ -1259,7 +1260,7 @@ mrq_abort_thread(void * v_maip)
}
static bool
-sg_share_prepare(int slave_wr_fd, int master_rd_fd, int id, bool vb_b)
+sg_share_prepare(int write_side_fd, int read_side_fd, int id, bool vb_b)
{
struct sg_extended_info sei;
struct sg_extended_info * seip;
@@ -1268,16 +1269,17 @@ sg_share_prepare(int slave_wr_fd, int master_rd_fd, int id, bool vb_b)
memset(seip, 0, sizeof(*seip));
seip->sei_wr_mask |= SG_SEIM_SHARE_FD;
seip->sei_rd_mask |= SG_SEIM_SHARE_FD;
- seip->share_fd = master_rd_fd;
- if (ioctl(slave_wr_fd, SG_SET_GET_EXTENDED, seip) < 0) {
+ seip->share_fd = read_side_fd;
+ if (ioctl(write_side_fd, SG_SET_GET_EXTENDED, seip) < 0) {
pr2serr_lk("tid=%d: ioctl(EXTENDED(shared_fd=%d), failed "
- "errno=%d %s\n", id, master_rd_fd, errno,
+ "errno=%d %s\n", id, read_side_fd, errno,
strerror(errno));
return false;
}
if (vb_b)
- pr2serr_lk("%s: tid=%d: ioctl(EXTENDED(shared_fd)) ok, master_fd=%d, "
- "slave_fd=%d\n", __func__, id, master_rd_fd, slave_wr_fd);
+ pr2serr_lk("%s: tid=%d: ioctl(EXTENDED(shared_fd)) ok, "
+ "read_side_fd=%d, write_side_fd=%d\n", __func__,
+ id, read_side_fd, write_side_fd);
return true;
}
@@ -2051,7 +2053,7 @@ sg_wr_swap_share(Rq_elem * rep, int to_fd, bool before)
bool not_first = false;
int err = 0;
int k;
- int master_fd = rep->infd; /* in (READ) side is master */
+ int read_side_fd = rep->infd;
struct global_collection * clp = rep->clp;
struct sg_extended_info sei;
struct sg_extended_info * seip = &sei;
@@ -2064,13 +2066,13 @@ sg_wr_swap_share(Rq_elem * rep, int to_fd, bool before)
seip->sei_rd_mask |= SG_SEIM_CHG_SHARE_FD;
seip->share_fd = to_fd;
if (before) {
- /* clear MASTER_FINI bit to put master in SG_RQ_SHR_SWAP state */
+ /* clear READ_SIDE_FINI bit: puts read-side in SG_RQ_SHR_SWAP state */
seip->sei_wr_mask |= SG_SEIM_CTL_FLAGS;
seip->sei_rd_mask |= SG_SEIM_CTL_FLAGS;
- seip->ctl_flags_wr_mask |= SG_CTL_FLAGM_MASTER_FINI;
- seip->ctl_flags &= SG_CTL_FLAGM_MASTER_FINI;/* would be 0 anyway */
+ seip->ctl_flags_wr_mask |= SG_CTL_FLAGM_READ_SIDE_FINI;
+ seip->ctl_flags &= SG_CTL_FLAGM_READ_SIDE_FINI;/* would be 0 anyway */
}
- for (k = 0; (ioctl(master_fd, SG_SET_GET_EXTENDED, seip) < 0) &&
+ for (k = 0; (ioctl(read_side_fd, SG_SET_GET_EXTENDED, seip) < 0) &&
(EBUSY == errno); ++k) {
err = errno;
if (k > 10000)
@@ -2078,7 +2080,7 @@ sg_wr_swap_share(Rq_elem * rep, int to_fd, bool before)
if (! not_first) {
if (clp->verbose > 3)
pr2serr_lk("tid=%d: ioctl(EXTENDED(change_shared_fd=%d), "
- "failed errno=%d %s\n", rep->id, master_fd, err,
+ "failed errno=%d %s\n", rep->id, read_side_fd, err,
strerror(err));
not_first = true;
}
@@ -2087,13 +2089,13 @@ sg_wr_swap_share(Rq_elem * rep, int to_fd, bool before)
}
if (err) {
pr2serr_lk("tid=%d: ioctl(EXTENDED(change_shared_fd=%d), failed "
- "errno=%d %s\n", rep->id, master_fd, err, strerror(err));
+ "errno=%d %s\n", rep->id, read_side_fd, err, strerror(err));
return false;
}
if (clp->verbose > 15)
pr2serr_lk("%s: tid=%d: ioctl(EXTENDED(change_shared_fd)) ok, "
- "master_fd=%d, to_slave_fd=%d\n", __func__, rep->id,
- master_fd, to_fd);
+ "read_side_fd=%d, to_write_side_fd=%d\n", __func__, rep->id,
+ read_side_fd, to_fd);
return true;
}
@@ -3089,9 +3091,9 @@ sg_start_io(Rq_elem * rep, mrq_arr_t & def_arr, int & pack_id,
else if (rep->outregfd < 0)
flags |= SGV4_FLAG_NO_DXFER;
- cp = (wr ? " slave active" : " master active");
+ cp = (wr ? " write_side active" : " read_side active");
} else
- cp = (wr ? " slave not sharing" : " master not sharing");
+ cp = (wr ? " write-side not sharing" : " read_side not sharing");
if (rep->both_sg) {
if (wr)
pack_id = rep->rd_p_id + 1;
diff --git a/testing/uapi_sg.h b/testing/uapi_sg.h
index d9401af9..2f40f7e8 100644
--- a/testing/uapi_sg.h
+++ b/testing/uapi_sg.h
@@ -14,7 +14,7 @@
* Later extensions (versions 2, 3 and 4) to driver:
* Copyright (C) 1998 - 2020 Douglas Gilbert
*
- * Version 4.0.13 (20200328)
+ * Version 4.0.44 (20200618)
* This version is for Linux 4 and 5 series kernels.
*
* Documentation
@@ -127,7 +127,7 @@ typedef struct sg_io_hdr {
#define SGV4_FLAG_NO_DXFER SG_FLAG_NO_DXFER /* needed for sharing */
#define SGV4_FLAG_MULTIPLE_REQS 0x20000 /* n sg_io_v4s in data-in */
#define SGV4_FLAG_EVENTFD 0x40000 /* signal completion on ... */
-#define SGV4_FLAG_ORDERED_SLV 0x80000 /* svb: issue in-order writes */
+#define SGV4_FLAG_ORDERED_WR 0x80000 /* svb: issue in-order writes */
/* Output (potentially OR-ed together) in v3::info or v4::info field */
#define SG_INFO_OK_MASK 0x1
@@ -194,8 +194,8 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
#define SG_SEIM_RESERVED_SIZE 0x4 /* reserved_sz of reserve request */
#define SG_SEIM_TOT_FD_THRESH 0x8 /* tot_fd_thresh of data buffers */
#define SG_SEIM_MINOR_INDEX 0x10 /* sg device minor index number */
-#define SG_SEIM_SHARE_FD 0x20 /* slave gives fd of master: sharing */
-#define SG_SEIM_CHG_SHARE_FD 0x40 /* master gives fd of new slave */
+#define SG_SEIM_SHARE_FD 0x20 /* write-side gives fd of read-side */
+#define SG_SEIM_CHG_SHARE_FD 0x40 /* read-side given new write-side fd */
#define SG_SEIM_SGAT_ELEM_SZ 0x80 /* sgat element size (>= PAGE_SIZE) */
#define SG_SEIM_EVENTFD 0x100 /* pass eventfd to driver */
#define SG_SEIM_ALL_BITS 0x1ff /* should be OR of previous items */
@@ -206,12 +206,12 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
#define SG_CTL_FLAGM_OTHER_OPENS 0x4 /* rd: other sg fd_s on this dev */
#define SG_CTL_FLAGM_ORPHANS 0x8 /* rd: orphaned requests on this fd */
#define SG_CTL_FLAGM_Q_TAIL 0x10 /* used for future cmds on this fd */
-#define SG_CTL_FLAGM_IS_SHARE 0x20 /* rd: fd is master or slave share */
-#define SG_CTL_FLAGM_IS_MASTER 0x40 /* rd: this fd is share master */
+#define SG_CTL_FLAGM_IS_SHARE 0x20 /* rd: fd is read-side or write-side share */
+#define SG_CTL_FLAGM_IS_READ_SIDE 0x40 /* rd: this fd is read-side share */
#define SG_CTL_FLAGM_UNSHARE 0x80 /* undo share after inflight cmd */
-/* rd> 1: master finished 0: not; wr> 1: finish share post master */
-#define SG_CTL_FLAGM_MASTER_FINI 0x100 /* wr> 0: setup for repeat slave req */
-#define SG_CTL_FLAGM_MASTER_ERR 0x200 /* rd: sharing, master got error */
+/* rd> 1: read-side finished, 0: not; wr> 1: finish share post read-side */
+#define SG_CTL_FLAGM_READ_SIDE_FINI 0x100 /* wr> 0: setup for repeat write-side req */
+#define SG_CTL_FLAGM_READ_SIDE_ERR 0x200 /* rd: sharing, read-side got error */
#define SG_CTL_FLAGM_NO_DURATION 0x400 /* don't calc command duration */
#define SG_CTL_FLAGM_MORE_ASYNC 0x800 /* yield EAGAIN in more cases */
#define SG_CTL_FLAGM_EXCL_WAITQ 0x1000 /* only 1 wake up per response */
diff --git a/utils/README b/utils/README
index c4d1dc3d..c00c22a7 100644
--- a/utils/README
+++ b/utils/README
@@ -17,4 +17,4 @@ in the Windows MinGW environment (e.g. msys shell); and 'Makefile.cygwin'
builds in the Windows Cygwin environment.
Douglas Gilbert
-4th November 2017
+4th November 2017