12 Apr, 2018

1 commit


17 Feb, 2017

2 commits


26 May, 2016

1 commit


11 Jun, 2015

1 commit

  • This function will delete unode with given (val,aux) pair.
    And with this patch, seqnum for debug usage doesn't have any meaning
    now, so remove them.

    This is used by later patches to skip snapshot root.

    Signed-off-by: Qu Wenruo
    Signed-off-by: Chris Mason

    Qu Wenruo
     

29 Jan, 2014

3 commits

  • There are not any users that use ulist except Btrfs,don't
    export them.

    Signed-off-by: Wang Shilong
    Reviewed-by: David Sterba
    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Wang Shilong
     
  • We are really suffering from now ulist's implementation, some developers
    gave their try, and i just gave some of my ideas for things:

    1. use list+rb_tree instead of arrary+rb_tree

    2. add cur_list to iterator rather than ulist structure.

    3. add seqnum into every node when they are added, this is
    used to do selfcheck when iterating node.

    I noticed Zach Brown's comments before, long term is to kick off
    ulist implementation, however, for now, we need at least avoid
    arrary from ulist.

    Cc: Liu Bo
    Cc: Josef Bacik
    Cc: Zach Brown
    Signed-off-by: Wang Shilong
    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Wang Shilong
     
  • Here we are not going to free memory, no need to remove every node
    one by one, just init root node here is ok.

    Cc: Liu Bo
    Signed-off-by: Wang Shilong
    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Wang Shilong
     

02 Jul, 2013

1 commit

  • Several users reported this crash of NULL pointer or general protection,
    the story is that we add a rbtree for speedup ulist iteration, and we
    use krealloc() to address ulist growth, and krealloc() use memcpy to copy
    old data to new memory area, so it's OK for an array as it doesn't use
    pointers while it's not OK for a rbtree as it uses pointers.

    So krealloc() will mess up our rbtree and it ends up with crash.

    Reviewed-by: Wang Shilong
    Signed-off-by: Liu Bo
    Signed-off-by: Josef Bacik

    Liu Bo
     

07 May, 2013

1 commit

  • Walking backref tree and btrfs quota rely on ulist very much.
    This patch tries to use rb_tree to speed up search time.

    The original code always checks whether an element
    exists before adding a new element, however it costs O(n).

    I try to add a rb_tree in the ulist,this is only used to speed up
    search. I also do some measurements with quota enabled.

    fsstress -p 4 -n 10000

    Without this path:
    real 0m51.058s 2m4.745s 1m28.222s 1m5.137s
    user 0m0.035s 0m0.041s 0m0.105s 0m0.100s
    sys 0m12.009s 0m11.246s 0m10.901s 0m10.999s 0m11.287s

    With this path:
    real 0m55.295s 0m50.960s 1m2.214s 0m48.273s
    user 0m0.053s 0m0.095s 0m0.135s 0m0.107s
    sys 0m7.766s 0m6.013s 0m6.319s 0m6.030s 0m6.532s

    After applying the patch,the execute time is down by ~42%.(11.287s->6.532s)

    Signed-off-by: Wang Shilong
    Reviewed-by: Miao Xie
    Reviewed-by: Jan Schmidt
    Signed-off-by: Josef Bacik

    Wang Shilong
     

02 Mar, 2013

1 commit

  • We want to avoid module.h where posible, since it in turn includes
    nearly all of header space. This means removing it where it is not
    required, and using export.h where we are only exporting symbols via
    EXPORT_SYMBOL and friends.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: Chris Mason

    Paul Gortmaker
     

02 Oct, 2012

1 commit


01 Jun, 2012

2 commits


30 May, 2012

1 commit


26 May, 2012

1 commit

  • ulist_next gets the pointer to the previously returned element to find the
    next element from there. However, when we call ulist_add while iteration
    with ulist_next is in progress (ulist explicitly supports this), we can
    realloc the ulist internal memory, which makes the pointer to the previous
    element useless.

    Instead, we now use an iterator parameter that's independent from the
    internal pointers.

    Reported-by: Alexander Block
    Signed-off-by: Jan Schmidt

    Jan Schmidt
     

22 Dec, 2011

1 commit

  • ulist is a generic data structures to hold a collection of unique u64
    values. The only operations it supports is adding to the list and
    enumerating it.

    It is possible to store an auxiliary value along with the key. The
    implementation is preliminary and can probably be sped up significantly.

    It is used by btrfs_find_all_roots() quota to translate recursions into
    iterative loops.

    Signed-off-by: Arne Jansen
    Signed-off-by: Jan Schmidt

    Arne Jansen