* Flusing caches on shutdown
@ 2001-02-19 12:45 David Balazic
2001-02-19 16:51 ` Ingo Oeser
0 siblings, 1 reply; 2+ messages in thread
From: David Balazic @ 2001-02-19 12:45 UTC (permalink / raw)
To: linux-kernel
(( CC me the replies, as I'm not subscribed to LKML ))
Hi!
It is a good idea IMO to flush the write cache of storage devices
at shutdown and other critical moments.
I browsed through linux-2.4.1 and see no use of the SYNCHRONIZE CACHE
SCSI command ( curiously it is defined in several other files
besides include/scsi/scsi.h , grep returns :
drivers/scsi/pci2000.h:#define SCSIOP_SYNCHRONIZE_CACHE 0x35
drivers/scsi/psi_dale.h:#define SCSIOP_SYNCHRONIZE_CACHE 0x35
drivers/scsi/psi240i.h:#define SCSIOP_SYNCHRONIZE_CACHE 0x35
)
I couldn't find evidence to the use of the equivalent ATA command either
( FLUSH CACHE , command code E7h ).
Also add ATAPI to the list. ( and all other interfaces. I checked just SCSI
and ATA )
Loosing data at powerdown due to write caches have been reported,
so this is no a theoretical problems. Also the journaled filesystems
are safe only in theory if the journal is not stored on non-volatile
memory, which is not guarantied in the current kernel.
What is the official word on this issue ?
I think this is important to the "enterprise" guys, at the least.
Sincerely,
david
PS: CC me , as I'm not subscribed to LKML
--
David Balazic
--------------
"Be excellent to each other." - Bill & Ted
- - - - - - - - - - - - - - - - - - - - - -
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Flusing caches on shutdown
2001-02-19 12:45 Flusing caches on shutdown David Balazic
@ 2001-02-19 16:51 ` Ingo Oeser
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Oeser @ 2001-02-19 16:51 UTC (permalink / raw)
To: David Balazic; +Cc: linux-kernel
On Mon, Feb 19, 2001 at 01:45:57PM +0100, David Balazic wrote:
> It is a good idea IMO to flush the write cache of storage devices
> at shutdown and other critical moments.
Not needed. All device drivers should disable write caches of
their devices, that need another signal than switching it off by
the power button to flush themselves.
> Loosing data at powerdown due to write caches have been reported,
> so this is no a theoretical problems. Also the journaled filesystems
> are safe only in theory if the journal is not stored on non-volatile
> memory, which is not guarantied in the current kernel.
Fine. If users/admins have write caching enabled, they either
know what they do, or should disable it (which is the default for
all mass storage drivers AFAIK).
Hardware Level caching is only good for OSes which have broken
drivers and broken caching (like plain old DOS).
Linux does a good job in caching and cache control at software
level.
Regards
Ingo Oeser
--
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< come and join the fun >>>>>>>>>>>>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-19 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-19 12:45 Flusing caches on shutdown David Balazic
2001-02-19 16:51 ` Ingo Oeser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®