lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 109/118] Btrfs: fix hole check in log_one_extent
    Date
    3.12-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Josef Bacik <jbacik@fusionio.com>

    commit ed9e8af88e2551aaa6bf51d8063a2493e2d71597 upstream.

    I added an assert to make sure we were looking up aligned offsets for csums and
    I tripped it when running xfstests. This is because log_one_extent was checking
    if block_start == 0 for a hole instead of EXTENT_MAP_HOLE. This worked out fine
    in practice it seems, but it adds a lot of extra work that is uneeded. With
    this fix I'm no longer tripping my assert. Thanks,

    Signed-off-by: Josef Bacik <jbacik@fusionio.com>
    Signed-off-by: Chris Mason <chris.mason@fusionio.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/btrfs/tree-log.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/btrfs/tree-log.c
    +++ b/fs/btrfs/tree-log.c
    @@ -3375,7 +3375,7 @@ static int log_one_extent(struct btrfs_t
    btrfs_set_token_file_extent_type(leaf, fi,
    BTRFS_FILE_EXTENT_REG,
    &token);
    - if (em->block_start == 0)
    + if (em->block_start == EXTENT_MAP_HOLE)
    skip_csum = true;
    }




    \
     
     \ /
      Last update: 2013-12-19 02:41    [W:2.653 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site