lkml.org 
[lkml]   [2009]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux 2.6.29


    On 30.03.2009 05:01 Mark Lord wrote:
    > Dave Chinner wrote:
    >> On Sat, Mar 28, 2009 at 11:17:08AM -0400, Mark Lord wrote:
    >>> The better solution seems to be the rather obvious one:
    >>>
    >>> the filesystem should commit data to disk before altering metadata.
    >>
    >> Generalities are bad. For example:
    >>
    >> write();
    >> unlink();
    >> <do more stuff>
    >> close();
    >>
    >> This is a clear case where you want metadata changed before data is
    >> committed to disk. In many cases, you don't even want the data to
    >> hit the disk here.
    > ..
    >
    > Err, no actually. I want a consistent disk state,
    > either all old or all new data after a crash.
    >
    >

    Dave is right that if you write to a file and unlink the same file, so
    that the data are orphaned. In that case you don't want the orphaned
    data to be written on disk. But Mark is right, too. Because in that case
    you probably also don't want any metadata to be written to the disk,
    unless the open() was already commited. You might have to update
    timestamps for the directory.
    So rephrasing it:
    The filesystem should not alter the metadata before writing the _linked_
    data.




    \
     
     \ /
      Last update: 2009-03-30 08:43    [W:4.988 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site