mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-20 15:04:19 +00:00
- Fixed crash introduced by r710 reported by andy yan <andyysj@gmail.com>
- Improve logging on write access on read-only devices - Make the same initiator coming through different sessions use shared IO context - Cleanups git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@721 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+2
-2
@@ -428,7 +428,7 @@ static int do_exec(struct vdisk_cmd *vcmd)
|
||||
if (do_fsync || fua)
|
||||
exec_fsync(vcmd);
|
||||
} else {
|
||||
TRACE(TRACE_MINOR, "Attempt to write to read-only "
|
||||
PRINT_WARNING("Attempt to write to read-only "
|
||||
"device %s", dev->name);
|
||||
set_cmd_error(vcmd,
|
||||
SCST_LOAD_SENSE(scst_sense_data_protect));
|
||||
@@ -469,7 +469,7 @@ static int do_exec(struct vdisk_cmd *vcmd)
|
||||
else if (do_fsync)
|
||||
exec_fsync(vcmd);
|
||||
} else {
|
||||
TRACE(TRACE_MINOR, "Attempt to write to read-only "
|
||||
PRINT_WARNING("Attempt to write to read-only "
|
||||
"device %s", dev->name);
|
||||
set_cmd_error(vcmd,
|
||||
SCST_LOAD_SENSE(scst_sense_data_protect));
|
||||
|
||||
+26
-7
@@ -163,13 +163,6 @@ do { \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_ERROR(format, args...) \
|
||||
do { \
|
||||
debug_print_prefix(trace_flag, __LOG_PREFIX, __FUNCTION__, \
|
||||
__LINE__); \
|
||||
PRINT("***ERROR*** " format, args); \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_INFO(format, args...) \
|
||||
do { \
|
||||
debug_print_prefix(trace_flag, __LOG_PREFIX, __FUNCTION__, \
|
||||
@@ -177,6 +170,20 @@ do { \
|
||||
PRINT(format, args); \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_WARNING(format, args...) \
|
||||
do { \
|
||||
debug_print_prefix(trace_flag, __LOG_PREFIX, __FUNCTION__, \
|
||||
__LINE__); \
|
||||
PRINT("***WARNING*** " format, args); \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_ERROR(format, args...) \
|
||||
do { \
|
||||
debug_print_prefix(trace_flag, __LOG_PREFIX, __FUNCTION__, \
|
||||
__LINE__); \
|
||||
PRINT("***ERROR*** " format, args); \
|
||||
} while(0)
|
||||
|
||||
#define TRACE_ENTRY() \
|
||||
do { \
|
||||
if (trace_flag & TRACE_ENTRYEXIT) \
|
||||
@@ -264,6 +271,12 @@ do { \
|
||||
PRINT("%s: " format, LOG_PREFIX, args); \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_WARNING(format, args...) \
|
||||
do { \
|
||||
PRINT("%s: ***WARNING*** " \
|
||||
format, LOG_PREFIX, args); \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_ERROR(format, args...) \
|
||||
do { \
|
||||
PRINT("%s: ***ERROR*** " \
|
||||
@@ -277,6 +290,12 @@ do { \
|
||||
PRINT(format, args); \
|
||||
} while(0)
|
||||
|
||||
#define PRINT_WARNING(format, args...) \
|
||||
do { \
|
||||
PRINT("***WARNING*** " format, args); \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define PRINT_ERROR(format, args...) \
|
||||
do { \
|
||||
PRINT("***ERROR*** " format, args); \
|
||||
|
||||
Reference in New Issue
Block a user