On Fri, 2005-01-07 at 13:49 -0600, John Goerzen wrote:
> On Tue, Dec 14, 2004 at 10:39:25AM -0600, Dave Kleikamp wrote:
> > On Tue, 2004-12-14 at 09:32 -0600, John Goerzen wrote:
> > > Is there any practical way I could try to address this?  I would rather
> > > have the files truncated, or even re-linked to /lost+found or something,
> > > than have them contain bad data.  I also never seemed to encounter this
> > > behavior with either ext2 or ext3.  Was I just lucky, or is there
> > > something fundamentally different about JFS?
> > 
> > I'm not sure how I would address this in jfs.  I don't know about ext3,
> 
> Well, in ext3 one has some options (mount(8) quoted below).  When I
> mount it data=ordered, things seem fine.  General wisdom holds that this
> is the preferred way to go.  It sounds like JFS is approximating
> data-journal.

Actually, jfs does the equivalent of data=writeback.  In the 2.4 kernel,
it does the equivalent of data=ordered, but I changed the behavior do
avoid a deadlock in 2.6 which I never found the correct fix for.

The data=ordered behavior would prevent random data from showing up in a
file, but it would not prevent the blocks of NULLs that you reported (if
these are really file holes as I suspect).  These would be caused when a
file written non-sequentially was committed before it was completely
written to.

I'll have to look again at implementing the data=ordered behavior.

> 
>        data=journal / data=ordered / data=writeback
>               Specifies  the  journalling  mode  for  file  data.  Metadata is
>               always journaled.  To use modes other than ordered on  the  root
>               file system, pass the mode to the kernel as boot parameter, e.g.
>               rootflags=data=journal.
> 
>               journal
>                      All data is committed into the  journal  prior  to  being
>                      written into the main file system.
> 
>               ordered
>                      This  is  the  default mode.  All data is forced directly
>                      out to the main file system prior to its  metadata  being
>                      committed to the journal.
> 
>               writeback
>                      Data ordering is not preserved - data may be written into
>                      the main file system after its metadata has been  commit-
>                      ted  to the journal.  This is rumoured to be the highest-
>                      throughput option.  It guarantees  internal  file  system
>                      integrity,  however  it  can  allow old data to appear in
>                      files after a crash and journal recovery.
-- 
David Kleikamp
IBM Linux Technology Center

_______________________________________________
Jfs-discussion mailing list
[email protected]
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/jfs-discussion

Reply via email to