Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
be48b57a
Commit
be48b57a
authored
Oct 05, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI] tidy up sd synchronize cache messages into a single line
parent
b16e83e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
drivers/scsi/sd.c
drivers/scsi/sd.c
+15
-6
No files found.
drivers/scsi/sd.c
View file @
be48b57a
...
...
@@ -581,8 +581,11 @@ static int sd_release(struct inode *inode, struct file *filp)
__MOD_DEC_USE_COUNT
(
sd_template
.
module
);
/* check that we actually have a write back cache to synchronize */
if
(
sdkp
->
WCE
)
if
(
sdkp
->
WCE
)
{
printk
(
KERN_NOTICE
"Synchronizing SCSI cache: "
);
sd_synchronize_cache
(
dsk_nr
,
1
);
printk
(
"
\n
"
);
}
return
0
;
}
...
...
@@ -1548,6 +1551,7 @@ static void __exit exit_sd(void)
static
int
sd_notifier
(
struct
notifier_block
*
nbt
,
unsigned
long
event
,
void
*
buf
)
{
int
i
;
char
*
msg
=
"Synchronizing SCSI caches: "
;
if
(
!
(
event
==
SYS_RESTART
||
event
==
SYS_HALT
||
event
==
SYS_POWER_OFF
))
...
...
@@ -1557,9 +1561,16 @@ static int sd_notifier(struct notifier_block *nbt, unsigned long event, void *bu
if
(
!
sdkp
||
!
sdkp
->
device
)
continue
;
if
(
sdkp
->
WCE
)
if
(
sdkp
->
WCE
)
{
if
(
msg
)
{
printk
(
KERN_NOTICE
"%s"
,
msg
);
msg
=
NULL
;
}
sd_synchronize_cache
(
i
,
1
);
}
}
if
(
!
msg
)
printk
(
"
\n
"
);
return
NOTIFY_OK
;
}
...
...
@@ -1579,7 +1590,7 @@ static int sd_synchronize_cache(int index, int verbose)
sd_dskname
(
index
,
buf
);
printk
(
"%s
: synchronizing cache...
"
,
buf
);
printk
(
"%s
"
,
buf
);
}
SRpnt
=
scsi_allocate_request
(
SDpnt
);
...
...
@@ -1607,9 +1618,7 @@ static int sd_synchronize_cache(int index, int verbose)
the_result
=
SRpnt
->
sr_result
;
scsi_release_request
(
SRpnt
);
if
(
verbose
)
{
if
(
the_result
==
0
)
{
printk
(
"OK
\n
"
);
}
else
{
if
(
the_result
!=
0
)
{
printk
(
"FAILED
\n
status = %x, message = %02x, host = %d, driver = %02x
\n
"
,
status_byte
(
the_result
),
msg_byte
(
the_result
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment