"Chris Knight" wrote:
> Howdy,
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Mike Silbersack
> > Sent: Tuesday, 9 July 2002 10:53
> > To: Peter Wemm
> > Cc: Julian Elischer; John Nielsen; [EMAIL PROTECTED]
> > Subject: Re: offtopic: low level format of IDE drive.
> > 
> > [snip]
> > 
> > So, this basically means that even a journalling filesystem wouldn't
> > be much safer... how about battery backed up controllers - would those
> > provide protection?  (I suspect not, but maybe they're more 
> > sophisticated than I thought.)
> > 
> That's right - a journalled filesystem doesn't help. Nor does battery
> backed up controllers.
>
> If the drive has come back and told the controller that it has written
> the data, then the controller - battery backed up or not - will mark
> those sectors as written. If it's a caching controller, then the cache
> entries for those sectors will be returned to the free list pool.
> The only way a journalled filesystem would help is if during replay, it
> checked that all the sectors matched prior to the checkpoint; ie write
> out all the sectors after the last checkpoint, then check sectors prior
> to the last checkpoint. That way, the journalled filesystem would know
> that the data had been written correctly.

Yes.  Journalled filesystems are just normal file systems with a journal
of recent *intentional* modifications to specific sectors.  It cannot save
you from modifications to *other* sectors as a side effect of writing.

> Does anyone have a detailed list of which SCSI drives do track writes
> rather than sector writes?

You can find out by turning write caching on and off.  camcontrol modepage
daN.  You want -m 8, the WCE bit. (write cache enable).  I do not remember
which -P args you need.

If you see a HUGE difference in writing smallish blocks to disk between WCE
on vs off, then you have a track write drive.

A true sectored drive would have much less of a slowdown.  I do not have a
comparable set handy to get a better idea of what to expect.  Really small
writes cost scsi overhead though, so that adds to the slowdown.  If I was
to take a best guiess, I would expect a factor 10+ slowdown for track-write
drives on 4K blocksize writes, vs factor 2-5 slowdown for a sectored drive.
This is the slowdown factor when turning WCE off.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to