~ubuntu-branches/ubuntu/wily/sg3-utils/wily

« back to all changes in this revision

Viewing changes to doc/sg_sync.8

  • Committer: Package Import Robot
  • Author(s): Ritesh Raj Sarraf
  • Date: 2013-06-23 16:08:01 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20130623160801-7rt7zb2dwk0ba7ut
Tags: 1.36-1
* [69e9dac] Imported Upstream version 1.36
* [cb75936] Add debian compat, level 7
* [68fed25] update README.source
* [3c724fc] Add build-dep autotools-dev
* [e4b9fdd] add destdir to install path
* [7cfff11] Simplify build with debhelper
* [f9a7540] Update symbols for 1.36 release
* [7b0b48d] Enable hardening build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH SG_SYNC "8" "March 2009" "sg3_utils\-1.27" SG3_UTILS
 
1
.TH SG_SYNC "8" "May 2013" "sg3_utils\-1.36" SG3_UTILS
2
2
.SH NAME
3
 
sg_sync \- send the scsi command synchronize cache
 
3
sg_sync \- send SCSI SYNCHRONIZE CACHE command
4
4
.SH SYNOPSIS
5
5
.B sg_sync
6
 
[\fI\-\-count=COUNT\fR] [\fI\-\-group=GROUP\fR] [\fI\-\-help\fR]
7
 
[\fI\-\-immed\fR] [\fI\-\-lba=LBA\fR] [\fI\-\-sync\-nv\fR]
8
 
[\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR
 
6
[\fI\-\-16\fR] [\fI\-\-count=COUNT\fR] [\fI\-\-group=GN\fR]
 
7
[\fI\-\-help\fR] [\fI\-\-immed\fR] [\fI\-\-lba=LBA\fR] [\fI\-\-sync\-nv\fR]
 
8
[\fI\-\-timeout=SECS\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR
9
9
.SH DESCRIPTION
10
10
.\" Add any additional description here
11
11
.PP
12
 
Send SYNCHRONIZE CACHE (10) command to \fIDEVICE\fR. This command is
13
 
defined for SCSI block devices (see SBC\-2). If successful this command
14
 
makes sure that any blocks whose latest versions are held in (volatile)
15
 
cache are written to (also termed as "synchronized with") the medium. If
16
 
the \fI\-\-sync\-nv\fR option is given and the device has a non\-volatile
17
 
cache then any blocks whose latest versions are held in volatile cache are
18
 
written to non\-volatile cache.
 
12
Send SYNCHRONIZE CACHE(10) or SYNCHRONIZE CACHE(16) command to \fIDEVICE\fR.
 
13
These commands are defined for SCSI block devices (see SBC\-3). If successful
 
14
these commands make sure that any blocks whose latest versions are held in
 
15
cache are written to (also termed as "synchronized with") the medium.
19
16
.PP
20
17
If the \fILBA\fR and \fICOUNT\fR arguments are both zero (their defaults)
21
18
then all blocks in the cache are synchronized. If \fILBA\fR is greater than
27
24
.SH OPTIONS
28
25
Arguments to long options are mandatory for short options as well.
29
26
.TP
 
27
\fB\-S\fR, \fB\-\-16\fR
 
28
performs a SYNCHRONIZE CACHE(16) command. Default is to perform a
 
29
SYNCHRONIZE CACHE(10) command.
 
30
.TP
30
31
\fB\-c\fR, \fB\-\-count\fR=\fICOUNT\fR
31
32
where \fICOUNT\fR is the number of blocks to synchronize from and including
32
 
\fILBA\fR. Default value is 0. When 0 then all blocks in the (volatile) cache
33
 
from and including \fILBA\fR argument to the highest block address are
34
 
synchronized.
 
33
\fILBA\fR. Default value is 0. When 0 then all blocks in the cache from and
 
34
including \fILBA\fR argument to the highest block address are synchronized.
35
35
.TP
36
 
\fB\-g\fR, \fB\-\-group\fR=\fIGROUP\fR
37
 
where \fIGROUP\fR is the group number which can be between 0 and 31 inclusive.
 
36
\fB\-g\fR, \fB\-\-group\fR=\fIGN\fR
 
37
where \fIGN\fR is the group number which can be between 0 and 31 inclusive.
38
38
The default value is 0 . Group numbers are used to segregate data collected
39
39
within the device. This is a new feature in SBC\-2 and can probably be
40
40
ignored for the time being.
45
45
\fB\-i\fR, \fB\-\-immed\fR
46
46
sets the IMMED bit in the SYNCHRONIZE CACHE command. This instructs the
47
47
device, if the format of the command is acceptable, to return a GOOD
48
 
status immediately rather than wait for the blocks in the (volatile)
49
 
cache to be synchronized with (i.e. written to) the medium (or the
50
 
non\-volatile cache).
 
48
status immediately rather than wait for the blocks in the cache to be
 
49
synchronized with (i.e. written to) the medium.
51
50
.TP
52
51
\fB\-l\fR, \fB\-\-lba\fR=\fILBA\fR
53
 
where \fILBA\fR is the lowest logical block address in the (volatile)
54
 
cache to synchronize to the medium (or the non\-volatile cache). Default
55
 
value is 0 .
 
52
where \fILBA\fR is the lowest logical block address in the cache to
 
53
synchronize to the medium. Default value is 0 .
56
54
.TP
57
 
\fB\-s\fR, \fB\-\-sync-nv\fR
 
55
\fB\-s\fR, \fB\-\-sync\-nv\fR
58
56
synchronize the (volatile) cache with the non\-volatile cache. Without this
59
57
option (or if there is no non\-volatile cache in the device) the
60
 
synchronization is with the medium.
 
58
synchronization is with the medium. The SYNC_NV bit was made obsolete in
 
59
SBC\-3 revsion 35d.
 
60
.TP
 
61
\fB\-t\fR, \fB\-\-timeout\fR=\fISECS\fR
 
62
where \fISECS\fR is the number of seconds the OS allows the SYNCHRONIZE
 
63
CACHE(16) to complete before it tries to cancel the command. Cancelling
 
64
commands (typically with the task management function "abort task") is
 
65
best avoided. Note this option is only active together with the \fI\-\-16\fR
 
66
option. The default timeout is 60 seconds for both SYNCHRONIZE CACHE(10)
 
67
and SYNCHRONIZE CACHE(16). Note that timeout issues can be avoided with
 
68
the \fI\-\-immed\fR option.
61
69
.TP
62
70
\fB\-v\fR, \fB\-\-verbose\fR
63
71
increase the level of verbosity, (i.e. debug output).
65
73
\fB\-V\fR, \fB\-\-version\fR
66
74
print the version string and then exit.
67
75
.SH NOTES
 
76
With the SYNCHRONIZE CACHE(16) command \fILBA\fR can be up to 64 bits
 
77
in size and \fICOUNT\fR up to 32 bits in size. With the SYNCHRONIZ
 
78
CACHE(10) command \fILBA\fR can be up to 32 bits in size and \fICOUNT\fR
 
79
up to 16 bits in size.
 
80
.PP
68
81
Various numeric arguments (e.g. \fILBA\fR) may include multiplicative
69
82
suffixes or be given in hexadecimal. See the "NUMERIC ARGUMENTS" section
70
83
in the sg3_utils(8) man page.
76
89
.SH "REPORTING BUGS"
77
90
Report bugs to <dgilbert at interlog dot com>.
78
91
.SH COPYRIGHT
79
 
Copyright \(co 2004\-2009 Douglas Gilbert
 
92
Copyright \(co 2004\-2013 Douglas Gilbert
80
93
.br
81
94
This software is distributed under a FreeBSD license. There is NO
82
95
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.