Date: 23 Mar 2002 13:06:55 -0700 From: Scott Long <scott_long@btc.adaptec.com> To: F J <fj6712@yahoo.com> Cc: freebsd-scsi@freebsd.org Subject: Re: SCSI write semantics Message-ID: <1016914015.13750.10.camel@hollin.btc.adaptec.com> In-Reply-To: <20020323185430.80848.qmail@web20503.mail.yahoo.com> References: <20020323185430.80848.qmail@web20503.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2002-03-23 at 11:54, F J wrote: > Are the SCSI disk writes atomic or they're hardware > dependent? What I mean is that if you issue a > 32KB write and the power goes off at the same > time, is there any gauarantee that either the > disk blocks will be updated completely or > nothing will be written at all? Not atomic, because multiple writes can be queued to a device at once. However, how the drive notifies that each write is complete depends on whether or not it has write caching enabled. If it doesn't, the command won't complete until the data is on a platter. This completion is propagated up through the OS. If write caching is enabled, the drive will complete the transaction while the data is only in the cache. If the power goes out, any data in the cache and not on a platter is lost, and the OS won't know to perform recovery since it was told by the drive that the data was written. > what about SCSI RAID > controllers? Good SCSI RAID controllers have an on-board battery to protect the write cache in case of a power failure. Of course, the cache setting of the drive can still be a factor. > Another concern is that DMA may be in > progress while memory contents become unstable. Is > this possible? > I'm having a problem picturing this scenario. Why would the memory contents be unstable? If it's once again due to a power loss, well, the SCSI adapter is going to loose power too before that DMA can make it to the SCSI bus. Scott > Regards, > > fj > > __________________________________________________ > Do You Yahoo!? > Yahoo! Movies - coverage of the 74th Academy Awards(r) > http://movies.yahoo.com/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-scsi" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1016914015.13750.10.camel>