On 04/11/12 21:09, Chris Samuel wrote:

> That said, there's been a lot of work done trying to catch issues which 
> could leave the filesystem in an inconsistent state on loss of power 
> (which was the most recent corruption issue I've noticed reported), 
> which kernel version are you thinking of?

I take that back, the following 2 patches merged for 3.7 address
potential filesystem corruption issues:


commit 5af3e8cce8b7ba0a2819e18c9146c8c0b452d479
Author: Stefan Behrens <[email protected]>
Date:   Wed Aug 1 18:56:49 2012 +0200

    Btrfs: make filesystem read-only when submitting barrier fails
    
    So far the return code of barrier_all_devices() is ignored, which
    means that errors are ignored. The result can be a corrupt
    filesystem which is not consistent.
    This commit adds code to evaluate the return code of
    barrier_all_devices(). The normal btrfs_error() mechanism is used to
    switch the filesystem into read-only mode when errors are detected.
    
    In order to decide whether barrier_all_devices() should return
    error or success, the number of disks that are allowed to fail the
    barrier submission is calculated. This calculation accounts for the
    worst RAID level of metadata, system and data. If single, dup or
    RAID0 is in use, a single disk error is already considered to be
    fatal. Otherwise a single disk error is tolerated.
    
    The calculation of the number of disks that are tolerated to fail
    the barrier operation is performed when the filesystem gets mounted,
    when a balance operation is started and finished, and when devices
    are added or removed.
    
    Signed-off-by: Stefan Behrens <[email protected]>



commit 62856a9b73860cffe2a3d91b069393b88c219aa6
Author: Stefan Behrens <[email protected]>
Date:   Tue Jul 31 11:09:44 2012 -0600

    Btrfs: detect corrupted filesystem after write I/O errors
    
    In check-integrity, detect when a superblock is written that points
    to blocks that have not been written to disk due to I/O write errors.
    
    Signed-off-by: Stefan Behrens <[email protected]>


-- 
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to