aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2019-12-06 19:21:44 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2019-12-06 19:21:44 +0000
commit4b4f37348b25f04b6f2f898aeebc6f5246e56831 (patch)
treeaf52b1a76e9aa3e80891125a8455218f74b776ca
parent207e52594d920e902f839b8e1aeac0e0abc476f5 (diff)
downloadsg3_utils-4b4f37348b25f04b6f2f898aeebc6f5246e56831.tar.gz
changes for zbc2r04, awaiting new mode page number; sgh_dd
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@836 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog8
-rw-r--r--debian/changelog2
-rw-r--r--doc/sg3_utils.82
-rw-r--r--lib/sg_lib_data.c11
-rw-r--r--sg3_utils.spec2
-rw-r--r--src/sg_logs.c15
-rw-r--r--src/sg_rep_zones.c12
-rw-r--r--src/sg_vpd.c23
-rw-r--r--testing/Makefile4
-rw-r--r--testing/sgh_dd.cpp107
10 files changed, 145 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index 0be46065..336ce088 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.45 [20191119] [svn: r835]
+Changelog for sg3_utils-1.45 [20191206] [svn: r836]
- sg_get_elem_status: new utility [sbc4r16]
- sg_ses: bug: --page= being overridden when --control
and --data= also given; fix
@@ -19,6 +19,7 @@ Changelog for sg3_utils-1.45 [20191119] [svn: r835]
- sg_raw: fix --send bug when using stdin
- sg_vpd: 3pc VPD page add copy group descriptor
- add --examine option
+ - new zoned block device char. field (zbc2r04)
- sg_read_buffer: decode read microcode status page
- add --inhex=FN option
- sg_request: add --error option, replaces opcode
@@ -33,13 +34,13 @@ Changelog for sg3_utils-1.45 [20191119] [svn: r835]
statistics lpage (sbc4r17)
- zoned block device statistics log page: shorten
counter fields from 8 to 4 bytes (zbc2r02)
+ - new field in this log page (zbc2r04)
- change '-ll' option to suppress subpages=0xff
apart from page 0x0,0xff. Used three times:
list all pages and subpages names reported
- sg_reassign: for defect list format 6 (vendor
specfic) don't try to decode
- - zbc: preparatory work for Zoned domains and
- realms; add new zbc service actions [19-032r3]
+ - sg_rep_zones: expand some fields per zbc2r04
- inhex directory: new, contains ASCII hex files
that can be used with the '--inhex=' option
- sg_lib: add sg_t10_uuid_desig2str()
@@ -52,6 +53,7 @@ Changelog for sg3_utils-1.45 [20191119] [svn: r835]
- sg_get_num()+sg_get_llnum(): add 'e' decoding,
- asc/ascq match asc-num.txt @t10 20191014
exabytes; allow addition (e.g. --count=3+1k)
+ - new zbc2r04 service actions
- sg_pt_freebsd: fixes for FreeBSD 12.0 release
- scripts: update 54-before-scsi-sg3_id.rules,
scsi-enable-target-scan.sh and
diff --git a/debian/changelog b/debian/changelog
index c5666049..a3f3060e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.45-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Sun, 17 Nov 2019 17:00:00 +1100
+ -- Douglas Gilbert <dgilbert@interlog.com> Fri, 06 Dec 2019 14:00:00 -0500
sg3-utils (1.44-0.1) unstable; urgency=low
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8
index 53c8930f..a85bcf25 100644
--- a/doc/sg3_utils.8
+++ b/doc/sg3_utils.8
@@ -1,4 +1,4 @@
-.TH SG3_UTILS "8" "November 2019" "sg3_utils\-1.45" SG3_UTILS
+.TH SG3_UTILS "8" "December 2019" "sg3_utils\-1.45" SG3_UTILS
.SH NAME
sg3_utils \- a package of utilities for sending SCSI commands
.SH SYNOPSIS
diff --git a/lib/sg_lib_data.c b/lib/sg_lib_data.c
index 21689d55..14c009f7 100644
--- a/lib/sg_lib_data.c
+++ b/lib/sg_lib_data.c
@@ -19,7 +19,8 @@
#include "sg_lib_data.h"
-const char * sg_lib_version_str = "2.68 20190904";/* spc5r22, sbc4r17 */
+const char * sg_lib_version_str = "2.69 20191204";
+/* spc5r22, sbc4r17, zbc2r04 */
/* indexed by pdt; those that map to own index do not decay */
@@ -529,10 +530,10 @@ struct sg_lib_value_name_t sg_lib_zoning_out_arr[] = {
/* Zoning in [0x95] service actions */
struct sg_lib_value_name_t sg_lib_zoning_in_arr[] = {
{0x0, PDT_ZBC, "Report zones"},
- {0x6, PDT_ZBC, "Report realms"}, /* 19-032r3 */
- {0x7, PDT_ZBC, "Report zone domains"}, /* 19-032r3 */
- {0x8, PDT_ZBC, "Zone activate"}, /* 19-032r3 */
- {0x9, PDT_ZBC, "Zone query"}, /* 19-032r3 */
+ {0x6, PDT_ZBC, "Report realms"}, /* zbc2r04 */
+ {0x7, PDT_ZBC, "Report zone domains"}, /* zbc2r04 */
+ {0x8, PDT_ZBC, "Zone activate"}, /* zbc2r04 */
+ {0x9, PDT_ZBC, "Zone query"}, /* zbc2r04 */
{0xffff, 0, NULL},
};
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 98bf0274..a15b0c17 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -84,7 +84,7 @@ fi
%{_libdir}/*.la
%changelog
-* Sun Nov 17 2019 - dgilbert at interlog dot com
+* Fri Dec 06 2019 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.45
diff --git a/src/sg_logs.c b/src/sg_logs.c
index 92db53d7..c65ecb91 100644
--- a/src/sg_logs.c
+++ b/src/sg_logs.c
@@ -36,7 +36,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.79 20191001"; /* spc5r22 + sbc4r17 */
+static const char * version_str = "1.80 20191205"; /* spc5r22 + sbc4r17 */
#define MX_ALLOC_LEN (0xfffc)
#define SHORT_RESP_LEN 128
@@ -5060,6 +5060,19 @@ show_zoned_block_dev_stats(const uint8_t * resp, int len,
}
printf(" %" PRIu32 "\n", sg_get_unaligned_be32(bp + 8));
break;
+ case 0xb: /* added zbc2r04 */
+ printf(" Maximum implicitly open or before required zones:");
+ if ((pl < 8) || (num < 8)) {
+ if (num < 8)
+ pr2serr("\n truncated by response length, expected "
+ "at least 8 bytes\n");
+ else
+ pr2serr("\n parameter length >= 8 expected, got %d\n",
+ pl);
+ break;
+ }
+ printf(" %" PRIu32 "\n", sg_get_unaligned_be32(bp + 8));
+ break;
default:
printf(" Reserved [parameter_code=0x%x]:\n", pc);
hex2stdout(bp, ((pl < num) ? pl : num), 0);
diff --git a/src/sg_rep_zones.c b/src/sg_rep_zones.c
index 02bdb773..c5b048f1 100644
--- a/src/sg_rep_zones.c
+++ b/src/sg_rep_zones.c
@@ -38,7 +38,7 @@
* and decodes the response. Based on zbc-r02.pdf
*/
-static const char * version_str = "1.17 20190113";
+static const char * version_str = "1.18 20191204";
#define MAX_RZONES_BUFF_LEN (1024 * 1024)
#define DEF_RZONES_BUFF_LEN (1024 * 8)
@@ -112,6 +112,7 @@ h_twoormore:
" 0x5 list zones with a zone condition of FULL\n"
" 0x6 list zones with a zone condition of READ ONLY\n"
" 0x7 list zones with a zone condition of OFFLINE\n"
+ " 0x8 list zones with a zone condition of INACTIVE\n"
" 0x10 list zones with RWP Recommended set to true\n"
" 0x11 list zones with Non-sequential write resources "
"active set to true\n"
@@ -202,6 +203,12 @@ zone_type_str(int zt, char * b, int blen, int vb)
case 3:
cp = "Sequential write preferred";
break;
+ case 4:
+ cp = "Sequential or before required";
+ break;
+ case 5:
+ cp = "Gap";
+ break;
default:
cp = NULL;
break;
@@ -239,6 +246,9 @@ zone_condition_str(int zc, char * b, int blen, int vb)
case 4:
cp = "Closed";
break;
+ case 5:
+ cp = "Inactive";
+ break;
case 0xd:
cp = "Read only";
break;
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index 3fdcca84..f18d8096 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -40,7 +40,7 @@
*/
-static const char * version_str = "1.55 20190913"; /* spc5r22 + sbc4r17 */
+static const char * version_str = "1.56 20191204"; /* spc5r22 + sbc4r17 */
/* standard VPD pages, in ascending page number order */
#define VPD_SUPPORTED_VPDS 0x0
@@ -2526,7 +2526,7 @@ decode_b5_vpd(uint8_t * b, int len, int do_hex, int pdt)
}
}
-/* VPD_ZBC_DEV_CHARS 0xb6 sbc or zbc */
+/* VPD_ZBC_DEV_CHARS 0xb6 sbc or zbc [zbc2r04] */
static void
decode_zbdc_vpd(uint8_t * b, int len, int do_hex)
{
@@ -2541,7 +2541,24 @@ decode_zbdc_vpd(uint8_t * b, int len, int do_hex)
"short=%d\n", len);
return;
}
- printf(" URSWRZ type: %d\n", !!(b[4] & 0x1));
+ printf(" Zoned block device extension: ");
+ switch ((b[4] >> 4) & 0xf) {
+ case 0:
+ printf("not reported\n");
+ break;
+ case 1:
+ printf("host aware zone block device model\n");
+ break;
+ case 2:
+ printf("Domains and realms zone block device model\n");
+ break;
+ default:
+ printf("Unknown [0x%x]\n", (b[4] >> 4) & 0xf);
+ break;
+ }
+ /* activation aligned on realm boundaries */
+ printf(" AAORB: %d\n", !!(b[4] & 0x2));
+ printf(" URSWRZ: %d\n", !!(b[4] & 0x1));
u = sg_get_unaligned_be32(b + 8);
printf(" Optimal number of open sequential write preferred zones: ");
if (SG_LIB_UNBOUNDED_32BIT == u)
diff --git a/testing/Makefile b/testing/Makefile
index 34c746c2..a9718f8c 100644
--- a/testing/Makefile
+++ b/testing/Makefile
@@ -28,10 +28,10 @@ LD = $(CXX)
CXXLD = $(CXX)
CPPFLAGS = -iquote ../include -iquote .. -D_REENTRANT $(LARGE_FILE_FLAGS) -DHAVE_CONFIG_H -DHAVE_NVME
-CXXFLAGS = -std=c++17 -pthread -g -O2 -W -Wall -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS)
+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 -DDEBUG
+CFLAGS = -ggdb -O2 -W -Wall -DDEBUG
# CFLAGS = -g -O2 -Wall -DSG_KERNEL_INCLUDES
# CFLAGS = -g -O2 -Wall -pedantic
# CFLAGS = -Wall -W -pedantic -std=c11 --analyze
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index f21ad456..d512aac1 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -108,7 +108,7 @@
using namespace std;
-static const char * version_str = "1.53 20191119";
+static const char * version_str = "1.55 20191201";
#ifdef __GNUC__
#ifndef __clang__
@@ -174,6 +174,7 @@ struct flags_t {
bool masync; /* more async sg v4 driver flag */
bool mmap;
bool mrq_immed; /* mrq submit non-blocking */
+ bool mrq_svb; /* mrq shared_variable_block, for sg->sg copy */
bool no_dur;
bool noshare;
bool no_unshare; /* leave it for driver close/release */
@@ -336,6 +337,7 @@ static atomic<int> num_abort_req(0);
static atomic<int> num_abort_req_success(0);
static atomic<int> num_mrq_abort_req(0);
static atomic<int> num_mrq_abort_req_success(0);
+static atomic<long> num_waiting_calls(0);
static sigset_t signal_set;
static pthread_t sig_listen_thread_id;
@@ -374,11 +376,18 @@ static int64_t dd_count = -1;
static int num_threads = DEF_NUM_THREADS;
static int exit_status = 0;
static volatile bool swait_reported = false;
+static bool after1 = false;
static mutex rand_lba_mutex;
static const char * my_name = "sgh_dd: ";
+static const char * mrq_blk_s = "mrq: ordinary blocking";
+static const char * mrq_vb_s = "mrq: variable blocking";
+static const char * mrq_svb_s = "mrq: shared variable blocking (svb)";
+static const char * mrq_s_nb_s = "mrq: submit non-blocking";
+static const char * mrq_nw_nb_s = "mrq: waitless non-blocking";
+
#ifdef __GNUC__
static int pr2serr_lk(const char * fmt, ...)
@@ -806,10 +815,10 @@ usage(int pg_num)
" if file or device to read from (def: stdin)\n"
" iflag comma separated list from: [coe,defres,dio,"
"direct,dpo,\n"
- " dsync,excl,fua,masync,mmap,mrq_immed,nodur, "
- "noshare\n"
- " no_waitq,noxfer,null,qtail,same_fds,v3,v4,"
- "wq_excl]\n"
+ " dsync,excl,fua,masync,mmap,mrq_immed,mrq_svb,"
+ "nodur,\n"
+ " noshare,no_waitq,noxfer,null,qtail,same_fds,"
+ "v3,v4,wq_excl]\n"
" of file or device to write to (def: /dev/null "
"N.B. different\n"
" from dd it defaults to stdout). If 'of=.' "
@@ -898,6 +907,8 @@ page3:
" mrq_immed if mrq active, do submit non-blocking (def: "
"ordered\n"
" blocking)\n"
+ " mrq_svb if mrq and sg->sg copy, do shared_variable_"
+ "blocking\n"
" nodur turns off command duration calculations\n"
" noshare if IFILE and OFILE are sg devices, don't set "
"up sharing\n"
@@ -1066,6 +1077,7 @@ mrq_abort_thread(void * v_maip)
pr2serr_lk("%s: from_id=%d: to abort mrq_pack_id=%d\n", __func__,
l_mai.from_tid, l_mai.mrq_id);
res = ioctl(l_mai.fd, SG_GET_NUM_WAITING, &n);
+ ++num_waiting_calls;
if (res < 0) {
err = errno;
pr2serr_lk("%s: ioctl(SG_GET_NUM_WAITING) failed: %s [%d]\n",
@@ -1537,6 +1549,7 @@ fini:
}
if (own_infd && (rep->infd >= 0)) {
if (vb && (FT_SG == clp->in_type)) {
+ ++num_waiting_calls;
if (ioctl(rep->infd, SG_GET_NUM_WAITING, &n) >= 0) {
if (n > 0)
pr2serr_lk("%s: tid=%d: num_waiting=%d prior close(in)\n",
@@ -1551,6 +1564,7 @@ fini:
}
if (own_outfd && (rep->outfd >= 0)) {
if (vb && (FT_SG == clp->out_type)) {
+ ++num_waiting_calls;
if (ioctl(rep->outfd, SG_GET_NUM_WAITING, &n) >= 0) {
if (n > 0)
pr2serr_lk("%s: tid=%d: num_waiting=%d prior "
@@ -2066,10 +2080,19 @@ sgh_do_async_mrq(Rq_elem * rep, mrq_arr_t & def_arr, int fd,
b_len = sizeof(b);
a_v4p = def_arr.first.data();
ctlop->flags = SGV4_FLAG_MULTIPLE_REQS;
- if (clp->in_flags.no_waitq || clp->out_flags.no_waitq)
+ if (clp->in_flags.no_waitq || clp->out_flags.no_waitq) {
ctlop->flags |= SGV4_FLAG_NO_WAITQ; /* waitless non-blocking */
- else
+ if (!after1 && (clp->debug > 1)) {
+ after1 = true;
+ pr2serr_lk("%s: %s\n", __func__, mrq_nw_nb_s);
+ }
+ } else {
ctlop->flags |= SGV4_FLAG_IMMED; /* submit non-blocking */
+ if (!after1 && (clp->debug > 1)) {
+ after1 = true;
+ pr2serr_lk("%s: %s\n", __func__, mrq_s_nb_s);
+ }
+ }
if (clp->debug > 4) {
pr2serr_lk("%s: Controlling object _before_ ioctl(SG_IOSUBMIT):\n",
__func__);
@@ -2087,6 +2110,7 @@ sgh_do_async_mrq(Rq_elem * rep, mrq_arr_t & def_arr, int fd,
}
/* fetch first half */
for (k = 0; k < 100000; ++k) {
+ ++num_waiting_calls;
res = ioctl(fd, SG_GET_NUM_WAITING, &nwait);
if (res < 0) {
err = errno;
@@ -2154,6 +2178,7 @@ sgh_do_async_mrq(Rq_elem * rep, mrq_arr_t & def_arr, int fd,
goto fini;
/* fetch remaining */
for (k = 0; k < 100000; ++k) {
+ ++num_waiting_calls;
res = ioctl(fd, SG_GET_NUM_WAITING, &nwait);
if (res < 0) {
pr2serr_lk("%s: ioctl(SG_GET_NUM_WAITING)-->%d, errno=%d: %s\n",
@@ -2393,7 +2418,6 @@ sgh_do_deferred_mrq(Rq_elem * rep, mrq_arr_t & def_arr)
sizeof(*aa_v4p), 1);
}
}
- fd_ctl.flags = SGV4_FLAG_MULTIPLE_REQS;
fd_ctl.dout_xferp = (uint64_t)aa_v4p; /* request array */
fd_ctl.dout_xfer_len = num_fd * sizeof(*aa_v4p);
fd_ctl.din_xferp = (uint64_t)aa_v4p; /* response array */
@@ -2424,7 +2448,6 @@ sgh_do_deferred_mrq(Rq_elem * rep, mrq_arr_t & def_arr)
sizeof(*aa_v4p), 1);
}
}
- o_fd_ctl.flags = SGV4_FLAG_MULTIPLE_REQS;
o_fd_ctl.dout_xferp = (uint64_t)aa_v4p; /* request array */
o_fd_ctl.dout_xfer_len = o_num_fd * sizeof(*aa_v4p);
o_fd_ctl.din_xferp = (uint64_t)aa_v4p; /* response array */
@@ -2438,14 +2461,37 @@ sgh_do_deferred_mrq(Rq_elem * rep, mrq_arr_t & def_arr)
goto fini;
}
- if (clp->unbalanced_mrq)
+ if (clp->unbalanced_mrq) {
+ if (!after1 && (clp->debug > 1)) {
+ after1 = true;
+ pr2serr_lk("%s: unbalanced %s\n", __func__, mrq_vb_s);
+ }
res = ioctl(fd, SG_IOSUBMIT, &ctl_v4);
- else {
+ } else {
if (clp->mrq_async) {
- iosub_str = "SUBMIT(variable)";
+ iosub_str = "SUBMIT(variable_blocking)";
+ if (!after1 && (clp->debug > 1)) {
+ after1 = true;
+ pr2serr_lk("%s: %s\n", __func__, mrq_vb_s);
+ }
res = ioctl(fd, SG_IOSUBMIT, &ctl_v4);
- } else
+ } else if (clp->in_flags.mrq_svb || clp->in_flags.mrq_svb) {
+ ctl_v4.flags |= SGV4_FLAG_SHARE;
+ iosub_str = "SUBMIT(shared_variable_blocking)";
+ if (!after1 && (clp->debug > 1)) {
+ after1 = true;
+ pr2serr_lk("%s: %s\n", __func__, mrq_svb_s);
+ }
+// v4hdr_out_lk("cop: shared_variable_blocking", &ctl_v4, id);
+ res = ioctl(fd, SG_IOSUBMIT, &ctl_v4);
+ } else {
+ iosub_str = "SG_IO(ordered_blocking)";
+ if (!after1 && (clp->debug > 1)) {
+ after1 = true;
+ pr2serr_lk("%s: %s\n", __func__, mrq_blk_s);
+ }
res = ioctl(fd, SG_IO, &ctl_v4);
+ }
}
if (res < 0) {
pr2serr_lk("%s: ioctl(SG_IO%s, %s)-->%d, errno=%d: %s\n",
@@ -2545,7 +2591,7 @@ sg_start_io(Rq_elem * rep, mrq_arr_t & def_arr, int & pack_id,
crwp = "reading";
}
if (qhead)
- qtail = false; /* qhead takes precedence */
+ qtail = false; /* qhead takes precedence */
if (sg_build_scsi_cdb(rep->cmd, cdbsz, rep->num_blks, blk, wr, fua,
dpo)) {
pr2serr_lk("%sbad cdb build, start_blk=%" PRId64 ", blocks=%d\n",
@@ -2719,10 +2765,11 @@ do_v4:
res = ioctl(fd, SG_IOABORT, h4p);
if (res < 0) {
err = errno;
- if (ENODATA == err)
- pr2serr_lk("%s: ioctl(SG_IOABORT) no match on "
- "pack_id=%d\n", __func__, pack_id);
- else
+ if (ENODATA == err) {
+ if (clp->debug > 2)
+ pr2serr_lk("%s: ioctl(SG_IOABORT) no match on "
+ "pack_id=%d\n", __func__, pack_id);
+ } else
pr2serr_lk("%s: ioctl(SG_IOABORT) failed: %s [%d]\n",
__func__, safe_strerror(err), err);
} else {
@@ -3177,6 +3224,10 @@ bypass:
}
}
fini:
+ t = 1;
+ res = ioctl(fd, SG_SET_DEBUG, &t); /* more info in /proc/scsi/sg/debug */
+ if (res < 0)
+ perror("sgh_dd: SG_SET_DEBUG error");
return (res < 0) ? 0 : num;
}
@@ -3220,8 +3271,12 @@ process_flags(const char * arg, struct flags_t * fp)
fp->masync = true;
else if (0 == strcmp(cp, "mmap"))
fp->mmap = true;
+ else if (0 == strcmp(cp, "mrq_imm"))
+ fp->mrq_immed = true;
else if (0 == strcmp(cp, "mrq_immed"))
fp->mrq_immed = true;
+ else if (0 == strcmp(cp, "mrq_svb"))
+ fp->mrq_svb = true;
else if (0 == strcmp(cp, "nodur"))
fp->no_dur = true;
else if (0 == strcmp(cp, "no_dur"))
@@ -3596,11 +3651,11 @@ parse_cmdline_sanity(int argc, char * argv[], Gbl_coll * clp, char * inf,
#endif
if (version_given) {
pr2serr("%s%s\n", my_name, version_str);
- return 0;
+ return SG_LIB_OK_FALSE;
}
if (clp->help > 0) {
usage(clp->help);
- return 0;
+ return SG_LIB_OK_FALSE;
}
if (clp->bs <= 0) {
clp->bs = DEF_BLOCK_SIZE;
@@ -3724,6 +3779,8 @@ main(int argc, char * argv[])
}
res = parse_cmdline_sanity(argc, argv, clp, inf, outf, out2f, outregf);
+ if (SG_LIB_OK_FALSE == res)
+ return 0;
if (res)
return res;
@@ -4247,8 +4304,12 @@ fini:
pr2serr("Number of successful MRQ Aborts: %d\n",
num_mrq_abort_req_success.load());
}
- if (clp->debug > 3)
- pr2serr("Final pack_id=%d, mrq_id=%d\n", mono_pack_id.load(),
- mono_mrq_id.load());
+ if (clp->debug > 1) {
+ if (clp->debug > 3)
+ pr2serr("Final pack_id=%d, mrq_id=%d\n", mono_pack_id.load(),
+ mono_mrq_id.load());
+ pr2serr("Number of SG_GET_NUM_WAITING calls=%ld\n",
+ num_waiting_calls.load());
+ }
return (res >= 0) ? res : SG_LIB_CAT_OTHER;
}