15 May, 2008

1 commit

  • As setting and clearing queue flags now requires that we hold a spinlock
    on the queue, and as blk_queue_stack_limits is called without that lock,
    get the lock inside blk_queue_stack_limits.

    For blk_queue_stack_limits to be able to find the right lock, each md
    personality needs to set q->queue_lock to point to the appropriate lock.
    Those personalities which didn't previously use a spin_lock, us
    q->__queue_lock. So always initialise that lock when allocated.

    With this in place, setting/clearing of the QUEUE_FLAG_PLUGGED bit will no
    longer cause warnings as it will be clear that the proper lock is held.

    Thanks to Dan Williams for review and fixing the silly bugs.

    Signed-off-by: NeilBrown
    Cc: Dan Williams
    Cc: Jens Axboe
    Cc: Alistair John Strachan
    Cc: Nick Piggin
    Cc: "Rafael J. Wysocki"
    Cc: Jacek Luczak
    Cc: Prakash Punnoor
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Brown
     

07 Feb, 2008

1 commit


09 Nov, 2007

1 commit


16 Oct, 2007

1 commit


10 Oct, 2007

1 commit

  • As bi_end_io is only called once when the reqeust is complete,
    the 'size' argument is now redundant. Remove it.

    Now there is no need for bio_endio to subtract the size completed
    from bi_size. So don't do that either.

    While we are at it, change bi_end_io to return void.

    Signed-off-by: Neil Brown
    Signed-off-by: Jens Axboe

    NeilBrown
     

24 Jul, 2007

1 commit

  • Some of the code has been gradually transitioned to using the proper
    struct request_queue, but there's lots left. So do a full sweet of
    the kernel and get rid of this typedef and replace its uses with
    the proper type.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

24 May, 2007

1 commit

  • Adding a drive to a linear array seems to have stopped working, due to changes
    elsewhere in md, and insufficient ongoing testing...

    So the patch to make linear hot-add work in the first place introduced a
    subtle bug elsewhere that interracts poorly with older version of mdadm.

    This fixes it all up.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

17 Mar, 2007

1 commit

  • When iterating through an array, one must be careful to test one's index
    variable rather than another similarly-named variable.

    The loop will read off the end of conf->disks[] in the following
    (pathological) case:

    % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1
    % for i in 2 3 4; do dd if=/dev/zero of=d$i bs=1k count=$(($i+150)); done
    % ./vmlinux ubd0=root ubd1=d1 ubd2=d2 ubd3=d3 ubd4=d4
    # mdadm -C /dev/md0 --level=linear --raid-devices=4 /dev/ubd[1234]

    adding some printks, I saw this:

    [42949374.960000] hash_spacing = 821120
    [42949374.960000] cnt = 4
    [42949374.960000] min_spacing = 801
    [42949374.960000] j=0 size=820928 sz=820928
    [42949374.960000] i=0 sz=820928 hash_spacing=820928
    [42949374.960000] j=1 size=64 sz=64
    [42949374.960000] j=2 size=64 sz=128
    [42949374.960000] j=3 size=64 sz=192
    [42949374.960000] j=4 size=1515870810 sz=1515871002

    Cc: Gautham R Shenoy
    Acked-by: Neil Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Isaacson
     

03 Oct, 2006

1 commit

  • Each backing_dev needs to be able to report whether it is congested, either by
    modulating BDI_*_congested in ->state, or by defining a ->congested_fn.
    md/raid did neither of these. This patch add a congested_fn which simply
    checks all component devices to see if they are congested.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

06 Aug, 2006

1 commit

  • A recent patch that allowed linear arrays to be reconfigured on-line
    allowed in a bug which results in divide by zero - not all
    mddev->array_size were converted to conf->array_size.

    This patch finished the conversion and fixed the bug.

    The offending patch was commit 7c7546ccf6463edbeee8d9aac6de7be1cd80d08a.

    Thanks to Simon Kirby for the bug report.

    Cc: Simon Kirby
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

27 Jun, 2006

1 commit


07 Jan, 2006

3 commits

  • Signed-off-by: Neil Brown
    Acked-by: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • md supports multiple different RAID level, each being implemented by a
    'personality' (which is often in a separate module).

    These personalities have fairly artificial 'numbers'. The numbers
    are use to:
    1- provide an index into an array where the various personalities
    are recorded
    2- identify the module (via an alias) which implements are particular
    personality.

    Neither of these uses really justify the existence of personality numbers.
    The array can be replaced by a linked list which is searched (array lookup
    only happens very rarely). Module identification can be done using an alias
    based on level rather than 'personality' number.

    The current 'raid5' modules support two level (4 and 5) but only one
    personality. This slight awkwardness (which was handled in the mapping from
    level to personality) can be better handled by allowing raid5 to register 2
    personalities.

    With this change in place, the core md module does not need to have an
    exhaustive list of all possible personalities, so other personalities can be
    added independently.

    This patch also moves the check for chunksize being non-zero into the ->run
    routines for the personalities that need it, rather than having it in core-md.
    This has a side effect of allowing 'faulty' and 'linear' not to have a
    chunk-size set.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Replace multiple kmalloc/memset pairs with kzalloc calls.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

01 Nov, 2005

1 commit

  • Instead of having ->read_sectors and ->write_sectors, combine the two
    into ->sectors[2] and similar for the other fields. This saves a branch
    several places in the io path, since we don't have to care for what the
    actual io direction is. On my x86-64 box, that's 200 bytes less text in
    just the core (not counting the various drivers).

    Signed-off-by: Jens Axboe

    Jens Axboe
     

10 Sep, 2005

2 commits


22 Jun, 2005

1 commit


17 May, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds