The patch below implements the following changes, because an

upcoming checkpatch version will complain about these:
* Make sure that a single tab is used for indenting instead of four spaces.
* Removed spaces from around the colon used for specifying field widths.
* Remove trailing whitespace in .txt files.

This patch has been tested by verifying that:
- the output of svn diff -x -w is empty, i.e. that the patch only affects
  whitespace.
- the SCST out-of-tree source code still compiles fine against the 2.6.25 kernel
  (make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s).

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-10-16 17:46:37 +00:00
parent 54cfaac7ee
commit 775ddf6f18
6 changed files with 55 additions and 55 deletions

View File

@@ -574,7 +574,7 @@ static void iscsi_set_datasize(struct iscsi_cmnd *cmnd, u32 offset, u32 size)
(last_off & ~PAGE_MASK);
int i = 4 - (size & 3);
while (i--)
*p++ = 0;
*p++ = 0;
}
}
@@ -678,13 +678,13 @@ static struct iscsi_cmnd *create_status_rsp(struct iscsi_cmnd *req, int status,
rsp->pdu.datasize = sizeof(struct iscsi_sense_data) + sense_len;
rsp->bufflen = (rsp->pdu.datasize + 3) & -4;
if (rsp->bufflen - rsp->pdu.datasize) {
int i = rsp->pdu.datasize;
u8 *p = (u8 *)sense + i;
int i = rsp->pdu.datasize;
u8 *p = (u8 *)sense + i;
while (i < rsp->bufflen) {
*p++ = 0;
i++;
}
while (i < rsp->bufflen) {
*p++ = 0;
i++;
}
}
} else {
rsp->pdu.datasize = 0;
@@ -1636,11 +1636,11 @@ static int cmnd_abort(struct iscsi_cmnd *req)
struct iscsi_scsi_cmd_hdr *hdr = cmnd_hdr(cmnd);
if (req_hdr->lun != hdr->lun) {
PRINT_ERROR("ABORT TASK: LUN mismatch: req LUN "
"%llx, cmd LUN %llx, rtt %u",
(long long unsigned int)req_hdr->lun,
(long long unsigned int)hdr->lun,
req_hdr->rtt);
PRINT_ERROR("ABORT TASK: LUN mismatch: req LUN "
"%llx, cmd LUN %llx, rtt %u",
(long long unsigned int)req_hdr->lun,
(long long unsigned int)hdr->lun,
req_hdr->rtt);
err = ISCSI_RESPONSE_FUNCTION_REJECTED;
goto out_put;
}

View File

@@ -32,8 +32,8 @@ struct iscsi_hdr {
u8 spec1[2];
#if defined(__BIG_ENDIAN_BITFIELD)
struct { /* 4 */
unsigned ahslength : 8;
unsigned datalength : 24;
unsigned ahslength:8;
unsigned datalength:24;
} length;
#elif defined(__LITTLE_ENDIAN_BITFIELD)
u32 length; /* 4 */

View File

@@ -1293,7 +1293,7 @@ int iscsi_send(struct iscsi_conn *conn)
goto out;
cmnd_tx_start(cmnd);
if (!(conn->hdigest_type & DIGEST_NONE))
init_tx_hdigest(cmnd);
init_tx_hdigest(cmnd);
conn->write_state = TX_BHS_DATA;
case TX_BHS_DATA:
res = iscsi_do_send(conn, ddigest && cmnd->pdu.datasize ?

View File

@@ -10,7 +10,7 @@ SCST's Internet page http://scst.sourceforge.net.
SCST supports the following I/O modes:
* Pass-through mode with one to many relationship, i.e. when multiple
initiators can connect to the exported pass-through devices, for
initiators can connect to the exported pass-through devices, for
the following SCSI devices types: disks (type 0), tapes (type 1),
processors (type 3), CDROMs (type 5), MO disks (type 7), medium
changers (type 8) and RAID controllers (type 0xC)
@@ -55,14 +55,14 @@ kernel logs (or run dmesg command for the few most recent messages).
IMPORTANT: Without loading appropriate device handler, corresponding devices
========= will be invisible for remote initiators, which could lead to holes
in the LUN addressing, so automatic device scanning by remote SCSI
mid-level could not notice the devices. Therefore you will have
to add them manually via
in the LUN addressing, so automatic device scanning by remote SCSI
mid-level could not notice the devices. Therefore you will have
to add them manually via
'echo "- - -" >/sys/class/scsi_host/hostX/scan',
where X - is the host number.
IMPORTANT: Working of target and initiator on the same host isn't
========= supported. This is a limitation of the Linux memory/cache
========= supported. This is a limitation of the Linux memory/cache
manager, because in this case an OOM deadlock like: system
needs some memory -> it decides to clear some cache -> cache
needs to write on a target exported device -> initiator sends
@@ -111,7 +111,7 @@ the user space, which allows to create pure user space devices. The
simplest example, where one would want it is if he/she wants to write a
VTL. With scst_user he/she can write it purely in the user space. Or one
would want it if he/she needs some sophisticated for kernel space
processing of the passed data, like encrypting them or making snapshots.
processing of the passed data, like encrypting them or making snapshots.
"Performance" device handlers for disks, MO disks and tapes in their
exec() method skip (pretend to execute) all READ and WRITE operations
@@ -248,12 +248,12 @@ interface in "/proc/scsi_tgt" directory. It contains the following
entries:
- "help" file, which provides online help for SCST commands
- "scsi_tgt" file, which on read provides information of serving by SCST
devices and their dev handlers. On write it supports the following
command:
* "assign H:C:I:L HANDLER_NAME" assigns dev handler "HANDLER_NAME"
* "assign H:C:I:L HANDLER_NAME" assigns dev handler "HANDLER_NAME"
on device with host:channel:id:lun
- "sessions" file, which lists currently connected initiators (open sessions)
@@ -264,11 +264,11 @@ entries:
allocations requests to the kernel. "Size" - is the commands data
size upper rounded to power of 2, "Hit" - how many there are
allocations from the cache, "Total" - total number of allocations.
- "threads" file, which allows to read and set number of SCST's threads
- "version" file, which shows version of SCST
- "trace_level" file, which allows to read and set trace (logging) level
for SCST. See "help" file for list of trace levels. If you want to
enable logging options, which produce a lot of events, like "debug",
@@ -324,32 +324,32 @@ To configure access and devices visibility management SCST provides the
following files and directories under /proc/scsi_tgt:
- "add_group GROUP" to /proc/scsi_tgt/scsi_tgt adds group "GROUP"
- "del_group GROUP" to /proc/scsi_tgt/scsi_tgt deletes group "GROUP"
- "add H:C:I:L lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP/devices adds
- "add H:C:I:L lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP/devices adds
device with host:channel:id:lun as LUN "lun" in group "GROUP". Optionally,
the device could be marked as read only.
- "del H:C:I:L" to /proc/scsi_tgt/groups/GROUP/devices deletes device with
host:channel:id:lun from group "GROUP"
- "add V_NAME lun [READ_ONLY]" to /proc/scsi_tgt/groups/GROUP/devices adds
device with virtual name "V_NAME" as LUN "lun" in group "GROUP".
Optionally, the device could be marked as read only.
- "del V_NAME" to /proc/scsi_tgt/groups/GROUP/devices deletes device with
virtual name "V_NAME" from group "GROUP"
- "clear" to /proc/scsi_tgt/groups/GROUP/devices clears the list of devices
for group "GROUP"
- "add NAME" to /proc/scsi_tgt/groups/GROUP/names adds name "NAME" to group
- "add NAME" to /proc/scsi_tgt/groups/GROUP/names adds name "NAME" to group
"GROUP"
- "del NAME" to /proc/scsi_tgt/groups/GROUP/names deletes name "NAME" from group
- "del NAME" to /proc/scsi_tgt/groups/GROUP/names deletes name "NAME" from group
"GROUP"
- "clear" to /proc/scsi_tgt/groups/GROUP/names clears the list of names
for group "GROUP"
@@ -364,7 +364,7 @@ Examples:
- "echo "add disk1 1" >/proc/scsi_tgt/groups/Default/devices" will
add virtual VDISK device with name "disk1" to "Default" group
with LUN 1.
with LUN 1.
VDISK device handler
--------------------
@@ -373,27 +373,27 @@ After loading VDISK device handler creates in "/proc/scsi_tgt/"
subdirectories "vdisk" and "vcdrom". They have similar layout:
- "trace_level" and "type" files as described for other dev handlers
- "help" file, which provides online help for VDISK commands
- "vdisk"/"vcdrom" files, which on read provides information of
currently open device files. On write it supports the following
command:
* "open NAME [PATH] [BLOCK_SIZE] [FLAGS]" - opens file "PATH" as
device "NAME" with block size "BLOCK_SIZE" bytes with flags
"FLAGS". "PATH" could be empty only for VDISK CDROM. "BLOCK_SIZE"
and "FLAGS" are valid only for disk VDISK. The block size must be
power of 2 and >= 512 bytes. Default is 512. Possible flags:
- WRITE_THROUGH - write back caching disabled. Note, this option
has sense only if you also *manually* disable write-back cache
in *all* your backstorage devices and make sure it's actually
disabled, since many devices are known to lie about this mode to
get better benchmark results.
- READ_ONLY - read only
- O_DIRECT - both read and write caching disabled. This mode
isn't currently fully implemented, you should use user space
fileio_tgt program in O_DIRECT mode instead (see below).
@@ -429,7 +429,7 @@ subdirectories "vdisk" and "vcdrom". They have similar layout:
- REMOVABLE - with this flag set the device is reported to remote
initiators as removable.
* "close NAME" - closes device "NAME".
* "change NAME [PATH]" - changes a virtual CD in the VDISK CDROM.
@@ -640,17 +640,17 @@ using debug2perf Makefile target.
attached remotely (SCSI target case), which sometimes could lead to
unexpectedly low throughput. You should increase read-ahead size to at
least 512KB or even more on all initiators and the target.
You should also limit on all initiators maximum amount of sectors per
SCSI command. To do it on Linux initiators, run:
echo “64” > /sys/block/sdX/queue/max_sectors_kb
where specify instead of X your imported from target device letter,
like 'b', i.e. sdb.
To increase read-ahead size on Linux, run:
blockdev --setra N /dev/sdX
where N is a read-ahead number in 512-byte sectors and X is a device
@@ -761,7 +761,7 @@ ISCSI-SCST driver also has its own iSCSI specific parameter for that.
4. Insrease speed of the target's backstorage.
5. Implement in SCST the dynamic I/O flow control.
5. Implement in SCST the dynamic I/O flow control.
To decrease device queue depth on Linux initiators run command:
@@ -789,7 +789,7 @@ Thanks to:
suggestions, bug reports and help in debugging.
* Ming Zhang <mingz@ele.uri.edu> for fixes and comments.
* Nathaniel Clark <nate@misrule.us> for fixes and comments.
* Calvin Morrow <calvin.morrow@comcast.net> for testing and useful

View File

@@ -97,7 +97,7 @@ static int __init init_scst_modisk_driver(void)
res = scst_dev_handler_build_std_proc(&modisk_devtype_perf);
if (res != 0)
goto out_unreg2;
goto out_unreg2;
out:
TRACE_EXIT_RES(res);

View File

@@ -22,7 +22,7 @@ If you have obtained SCST from the SCST SVN repository as an out-of-tree
kernel subsystem, proceed as follows to compile and install the SRP target
driver:
$ make
$ make
$ make install
To minimize QUEUEFULL conditions, please apply scst_increase_max_tgt_cmds
@@ -48,7 +48,7 @@ a. modprobe scst
b. modprobe scst_disk
c. cat /proc/scsi_tgt/scsi_tgt
ibstor00:~ # cat /proc/scsi_tgt/scsi_tgt
ibstor00:~ # cat /proc/scsi_tgt/scsi_tgt
Device (host:ch:id:lun or name) Device handler
0:0:0:0 dev_disk
4:0:0:0 dev_disk