public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: L A Walsh <lkml@tlinx.org>
To: Chris Wedgwood <cw@f00f.org>
Cc: Norberto Bensa <norberto+linux-kernel@bensa.ath.cx>,
	Jan Knutar <jk-lkml@sci.fi>, L A Walsh <lkml@tlinx.org>,
	linux-kernel@vger.kernel.org
Subject: Re: XFS: how to NOT null files on fsck?
Date: Mon, 12 Jul 2004 15:40:08 -0700	[thread overview]
Message-ID: <40F31348.70807@tlinx.org> (raw)
In-Reply-To: <20040712212020.GA22372@taniwha.stupidest.org>

<aside>
Chris, I'd never say you were full of shit or lied in any circumstance.
Mistakes are human -- not being "full of shit" or "lying".  Get over it.
Don't inflate error.  Seems to be related to pervasive belief that people
have to be either all good or all bad or all perfect, or flawed, or all 
white
hat or black hat, God or imperfect and to be "good" in programming field
one must be perfect and never be _known_ to make a mistake (like some
who portray others as dangerous or fools because they may hold knowledge of
that name-callers' faults).  The ones who pose the real danger are those
who censor others because the "masses" can't handle the truth.  Anyway
it's unuseful to demean yourself or others.  </aside>

If it is of any help (I doubt it, it perplexes me)...the files I've
written out with vim and have returned "nulls" have been files that were
written out 2-3 _DAYS_ earlier -- often with more recent write having
been saved fine. 

I've also seen sections in log files where blocks would return zero in the
middle of a log.  Obviously blocks before and after successfully made it to
disk, but in _RARE_ circumstances (crashes and unplanned shutdowns are 
already
rare enough, so it's a rare bug that only shows up on a 'rare' 
occasion...:-).

Almost (shot in the dark), like some code that was supposed to zero 
unused but allocated
datablocks got pointed at the wrong blocks, since these files are 
readable as having
been written (yes may all be out of membuffs) and are often recoverable 
from the day's
backup. 

If it was a file I just edited and then it crashed, that I could 
understand more than
having files I haven't touched for a few days be zapped.

-l



Chris Wedgwood wrote:

>On Sat, Jul 10, 2004 at 12:19:14PM -0700, Chris Wedgwood wrote:
>
>  
>
>>It would be nice for some people to prevent log-replay zeroing files
>>but then something would have to be able to determine whether or not
>>these blocks were newly allocated (and this might contain
>>confidential data and need to be zeroed) or previously part of the
>>file in which case we probably would like them left alone.
>>    
>>
>
>I told lies.
>
>  
>
>>I don't know any of the code well enough to know how easy this is or
>>even if I'm telling the truth :) Hopefully someone who does can
>>speak up on this.
>>    
>>
>
>I knew I was completely full of shit.
>
>
>XFS does *not* zero files, it simply returns zeros for unwritten
>extents.  If you open an existing file and scribble all over it, you
>might see the old data during a crash, or the new data if it was
>flushed.  You shouldn't see zero's though.
>
>What does happen though, is that dotfiles are truncated and rewritten,
>if the data blocks aren't flushed you will get zeros back because the
>extents were unwritten.  This is really the only sensible thing to do
>given the circumstances.
>
>My guess is that with other fs' (when journaling metadata only) the
>blocks allocated for the newly written data are *usually* the same as
>the recently freed blocks from the truncate so things appear to work
>but in reality it's probably mostly luck.  XFS could behave the same
>way, but sooner or later you will still loose when you get crap back
>instead of old data.
>
>Some applications just need to be fixed.
>
>
>   --cw
>  
>

  reply	other threads:[~2004-07-12 22:40 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-05  5:47 XFS: how to NOT null files on fsck? Norberto Bensa
2004-07-09 16:37 ` L A Walsh
2004-07-09 21:59   ` Chris Wedgwood
2004-07-10 18:33     ` L A Walsh
2004-07-10 18:43       ` Chris Wedgwood
2004-07-10 21:24         ` Bernd Eckenfels
2004-07-11 21:54           ` Helge Hafting
2004-07-12 17:56             ` H. Peter Anvin
2004-07-12 19:59               ` Chris Wedgwood
2004-07-12 20:32                 ` H. Peter Anvin
2004-07-12 22:29                 ` Bernd Eckenfels
2004-07-12 23:03       ` Bernd Eckenfels
2004-07-12 23:14         ` Chris Wedgwood
2004-07-10 18:43     ` Jan Knutar
2004-07-10 18:46       ` Chris Wedgwood
2004-07-10 18:55         ` Norberto Bensa
2004-07-10 19:19           ` Chris Wedgwood
2004-07-12 21:20             ` Chris Wedgwood
2004-07-12 22:40               ` L A Walsh [this message]
2004-07-12 22:53                 ` Chris Wedgwood
2004-07-13  1:44                   ` Bernd Eckenfels
2004-07-13  5:24                     ` Chris Wedgwood
     [not found]             ` <2hgxc-5x9-9@gated-at.bofh.it>
2004-07-13  7:25               ` Anton Ertl
2004-07-13  8:09                 ` Chris Wedgwood
2004-07-13  9:34                   ` Anton Ertl
2004-07-13  9:53                     ` Chris Wedgwood
2004-07-13 10:27                       ` Tim Connors
2004-07-13 10:38                         ` ismail dönmez
2004-07-13 11:16                           ` Nick Piggin
2004-07-13 12:52                             ` ismail dönmez
2004-07-13 10:58                         ` Chris Wedgwood
2004-07-13 13:33                       ` Anton Ertl
2004-07-13 20:32                         ` Chris Wedgwood
2004-07-13 22:42                           ` Bernd Eckenfels
2004-07-14 18:49                           ` Anton Ertl
2004-07-14 19:00                             ` Chris Wedgwood
2004-07-13 22:24                 ` Helge Hafting
2004-07-13 22:39                   ` Chris Wedgwood
2004-07-13 23:23                   ` Bernd Eckenfels
2004-07-14 18:53                   ` Anton Ertl
2004-07-10 19:33           ` Andreas Schwab
2004-07-10 19:40             ` Chris Wedgwood
2004-07-10 19:46             ` Norberto Bensa
2004-07-10 20:03               ` Chris Wedgwood
2004-07-11  1:21           ` Gopikrishnan Sidhardhan
2004-07-29  1:30   ` Nathan Scott
2004-08-03 18:31     ` L A Walsh
2004-08-04  0:48       ` Andi Kleen
2004-08-04  6:37         ` L A Walsh
2004-08-05  8:16       ` Helge Hafting
2004-08-06  1:10         ` Nathan Scott
2004-08-06  1:34           ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40F31348.70807@tlinx.org \
    --to=lkml@tlinx.org \
    --cc=cw@f00f.org \
    --cc=jk-lkml@sci.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=norberto+linux-kernel@bensa.ath.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox