Lines Matching defs:cur
123 struct btrfs_stripe_hash *cur;
148 cur = h + i;
149 INIT_LIST_HEAD(&cur->hash_list);
150 spin_lock_init(&cur->lock);
553 struct btrfs_raid_bio *cur)
556 test_bit(RBIO_RMW_LOCKED_BIT, &cur->flags))
567 test_bit(RBIO_CACHE_BIT, &cur->flags))
570 if (last->bioc->full_stripe_logical != cur->bioc->full_stripe_logical)
574 if (last->operation != cur->operation)
653 struct btrfs_raid_bio *cur;
662 list_for_each_entry(cur, &h->hash_list, hash_list) {
663 if (cur->bioc->full_stripe_logical != rbio->bioc->full_stripe_logical)
666 spin_lock(&cur->bio_list_lock);
669 if (bio_list_empty(&cur->bio_list) &&
670 list_empty(&cur->plug_list) &&
671 test_bit(RBIO_CACHE_BIT, &cur->flags) &&
672 !test_bit(RBIO_RMW_LOCKED_BIT, &cur->flags)) {
673 list_del_init(&cur->hash_list);
674 refcount_dec(&cur->refs);
676 steal_rbio(cur, rbio);
677 cache_drop = cur;
678 spin_unlock(&cur->bio_list_lock);
684 if (rbio_can_merge(cur, rbio)) {
685 merge_rbio(cur, rbio);
686 spin_unlock(&cur->bio_list_lock);
698 list_for_each_entry(pending, &cur->plug_list, plug_list) {
701 spin_unlock(&cur->bio_list_lock);
712 list_add_tail(&rbio->plug_list, &cur->plug_list);
713 spin_unlock(&cur->bio_list_lock);
808 static void rbio_endio_bio_list(struct bio *cur, blk_status_t err)
812 while (cur) {
813 next = cur->bi_next;
814 cur->bi_next = NULL;
815 cur->bi_status = err;
816 bio_endio(cur);
817 cur = next;
827 struct bio *cur = bio_list_get(&rbio->bio_list);
854 rbio_endio_bio_list(cur, err);
1578 struct btrfs_raid_bio *cur;
1584 cur = list_entry(plug->rbio_list.next,
1586 list_del_init(&cur->plug_list);
1588 if (rbio_is_full(cur)) {
1590 start_async_work(cur, rmw_rbio_work);
1594 if (rbio_can_merge(last, cur)) {
1595 merge_rbio(last, cur);
1596 free_raid_bio(cur);
1601 last = cur;