aboutsummaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/sg_mrq_dd.cpp18
-rw-r--r--testing/sg_tst_bidi.c2
-rw-r--r--testing/sgh_dd.cpp18
-rw-r--r--testing/uapi_sg.h4
4 files changed, 21 insertions, 21 deletions
diff --git a/testing/sg_mrq_dd.cpp b/testing/sg_mrq_dd.cpp
index 0706f1af..959a6848 100644
--- a/testing/sg_mrq_dd.cpp
+++ b/testing/sg_mrq_dd.cpp
@@ -396,7 +396,7 @@ static atomic<bool> vb_first_time(true);
static sigset_t signal_set;
static sigset_t orig_signal_set;
-static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio";
+static const char * sg_allow_dio = "/sys/module/sg/parameters/allow_dio";
static int do_both_sg_segment(Rq_elem * rep, scat_gath_iter & i_sg_it,
scat_gath_iter & o_sg_it, int seg_blks,
@@ -632,12 +632,12 @@ page4:
"each issued\nSCSI command. When both IFILE and OFILE are sg "
"devices, then the READ in\neach read-write pair is issued an "
"even pack_id and its WRITE pair is\ngiven the pack_id one "
- "higher (i.e. an odd number). This enables a\n'cat '"
- "/proc/scsi/sg/debug' user to see that progress is being "
+ "higher (i.e. an odd number). This enables a\n'dmesg -w' "
+ "user to see that progress is being "
"made.\n\n");
pr2serr("Debugging:\n"
"Apart from using one or more '--verbose' options which gets a "
- "bit noisy\n'cat /proc/scsi/sg/debug' can give a good overview "
+ "bit noisy\n'dmesg -w' can give a good overview "
"of what is happening.\nThat does a sg driver object tree "
"traversal that does minimal locking\nto make sure that each "
"traversal is 'safe'. So it is important to note\nthe whole "
@@ -650,7 +650,7 @@ page4:
"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 "
+ "Busy state (abbreviated to 'bsy' in the dmesg "
"output)\nis entered during request setup and completion. It "
"is intended to be\na temporary state. It should not block "
"but does sometimes (e.g. in\nblock_get_request()). Even so "
@@ -1255,7 +1255,7 @@ bypass:
}
if (clp->verbose) {
t = 1;
- /* more info in /proc/scsi/sg/debug */
+ /* more info in the kernel log */
res = ioctl(fd, SG_SET_DEBUG, &t);
if (res < 0)
perror("sg_mrq_dd: SG_SET_DEBUG error");
@@ -1507,7 +1507,7 @@ sig_listen_thread(struct global_collection * clp)
} else
pr2serr_lk("%s: subsequent stall at pack_id=%d\n",
__func__, pack_id);
- system_wrapper("/usr/bin/cat /proc/scsi/sg/debug\n");
+ system_wrapper("/usr/bin/dmesg\n");
} else
prev_pack_id = pack_id;
} else if (EAGAIN != err)
@@ -4614,11 +4614,11 @@ fini:
pr2serr(">> Direct IO requested but incomplete %d times\n",
clp->dio_incomplete_count.load());
- if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
+ if ((fd = open(sg_allow_dio, O_RDONLY)) >= 0) {
if (1 == read(fd, &c, 1)) {
if ('0' == c)
pr2serr(">>> %s set to '0' but should be set to '1' for "
- "direct IO\n", proc_allow_dio);
+ "direct IO\n", sg_allow_dio);
}
close(fd);
}
diff --git a/testing/sg_tst_bidi.c b/testing/sg_tst_bidi.c
index c142f401..0b81e144 100644
--- a/testing/sg_tst_bidi.c
+++ b/testing/sg_tst_bidi.c
@@ -585,7 +585,7 @@ rep_async:
}
if (direct_io && (dirio_count < q_len)) {
pr2serr("Direct IO requested %d times, done %d times\nMaybe need "
- "'echo 1 > /proc/scsi/sg/allow_dio'\n", q_len, dirio_count);
+ "'echo 1 > /sys/module/sg/parameters/allow_dio'\n", q_len, dirio_count);
}
if (rep_count-- > 0)
goto rep_async;
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index 6f8a3ecd..83b4e5bc 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -388,7 +388,7 @@ static sigset_t signal_set;
static sigset_t orig_signal_set;
static pthread_t sig_listen_thread_id;
-static const char * proc_allow_dio = "/proc/scsi/sg/allow_dio";
+static const char * sg_allow_dio = "/sys/module/sg/parameters/allow_dio";
static void sg_in_rd_cmd(struct global_collection * clp, Rq_elem * rep,
mrq_arr_t & def_arr);
@@ -661,12 +661,12 @@ page4:
"each issued\nSCSI command. When both IFILE and OFILE are sg "
"devices, then the READ in\neach read-write pair is issued an "
"even pack_id and its WRITE pair is\ngiven the pack_id one "
- "higher (i.e. an odd number). This enables a\n'cat '"
- "/proc/scsi/sg/debug' user to see that progress is being "
+ "higher (i.e. an odd number). This enables a\n'dmesg -w' "
+ "user to see that progress is being "
"made.\n\n");
pr2serr("Debugging:\n"
"Apart from using one or more '--verbose' options which gets a "
- "bit noisy\n'cat /proc/scsi/sg/debug' can give a good overview "
+ "bit noisy\n'dmesg -w' can give a good overview "
"of what is happening.\nThat does a sg driver object tree "
"traversal that does minimal locking\nto make sure that each "
"traversal is 'safe'. So it is important to note\nthe whole "
@@ -679,7 +679,7 @@ page4:
"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 "
+ "Busy state (abbreviated to 'bsy' in the dmesg "
"output)\nis entered during request setup and completion. It "
"is intended to be\na temporary state. It should not block "
"but does sometimes (e.g. in\nblock_get_request()). Even so "
@@ -1259,7 +1259,7 @@ sig_listen_thread(void * v_clp)
} else
pr2serr_lk("%s: subsequent stall at pack_id=%d\n",
__func__, pack_id);
- system_wrapper("/usr/bin/cat /proc/scsi/sg/debug\n");
+ system_wrapper("/usr/bin/dmesg\n");
} else
prev_pack_id = pack_id;
} else if (EAGAIN != err)
@@ -3753,7 +3753,7 @@ bypass:
}
}
t = 1;
- res = ioctl(fd, SG_SET_DEBUG, &t); /* more info in /proc/scsi/sg/debug */
+ res = ioctl(fd, SG_SET_DEBUG, &t); /* more info in the kernel log */
if (res < 0)
perror("sgs_dd: SG_SET_DEBUG error");
return (res < 0) ? 0 : num;
@@ -5041,11 +5041,11 @@ fini:
pr2serr(">> Direct IO requested but incomplete %d times\n",
clp->dio_incomplete_count.load());
- if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
+ if ((fd = open(sg_allow_dio, O_RDONLY)) >= 0) {
if (1 == read(fd, &c, 1)) {
if ('0' == c)
pr2serr(">>> %s set to '0' but should be set to '1' for "
- "direct IO\n", proc_allow_dio);
+ "direct IO\n", sg_allow_dio);
}
close(fd);
}
diff --git a/testing/uapi_sg.h b/testing/uapi_sg.h
index 270ad468..9cc51dc0 100644
--- a/testing/uapi_sg.h
+++ b/testing/uapi_sg.h
@@ -442,8 +442,8 @@ struct sg_header {
#define SG_SET_COMMAND_Q 0x2271 /* Change queuing state with 0 or 1 */
/*
- * Turn on/off error sense trace (1 and 0 respectively, default is off).
- * Try using: "# cat /proc/scsi/sg/debug" instead in the v3 driver
+ * Turn on/off error sense trace in the kernel log (1 and 0 respectively, default is
+ * off).
*/
#define SG_SET_DEBUG 0x227e /* 0 -> turn off debug */