On 1/29/11 12:00 PM -0600 Stan Hoeppner wrote:
From: http://xfs.org/index.php/XFS_FAQ

"Q: Why do I see binary NULLS in some files after recovery when I
unplugged the power?

Update: This issue has been addressed with a CVS fix on the 29th March
2007 and merged into mainline on 8th May 2007 for 2.6.22-rc1.

XFS journals metadata updates, not data updates. After a crash you are
supposed to get a consistent filesystem which looks like the state
sometime shortly before the crash, NOT what the in memory image looked
like the instant before the crash.

Since XFS does not write data out immediately unless you tell it to with
fsync, an O_SYNC or O_DIRECT open (the same is true of other
filesystems), you are looking at an inode which was flushed out, but
whose data was not. Typically you'll find that the inode is not taking
any space since all it has is a size but no extents allocated (try
examining the file with the xfs_bmap(8) command)."


Note "the same is true of other filesystems".

No it isn't.  Not all file systems buffer writes this way.

 Since 2007, XFS is no
worse nor better at handling power loss than any other journaling
filesystem.  If power loss is a frequent concern in any organization,
using any filesystem, you had best be fsync'ing all writes.

Well, unless of course you are ok with losing data.  There are many
many applications that can sustain data loss, so for those applications
you can tune the filesystem for highest performance, and even if
power loss is frequent you just don't care.

What you meant to say was, if data loss is a concern.

 No
filesystems today cause data loss due to power loss.  Data loss due to
power loss today is caused by the Linux buffer cache having pending disk
writes held in memory.  When the power goes, so do the contents of RAM,
so you loose that data.  This is filesystem independent.

No it isn't.  The buffer cache isn't independent of the filesystem.

Reply via email to