Lines Matching defs:head
359 struct llist_node *head;
361 head = llist_del_all(&conf->released_stripes);
362 head = llist_reverse_order(head);
363 llist_for_each_entry_safe(sh, t, head, release_list) {
818 struct stripe_head *head;
832 head = __find_stripe(conf, head_sector, conf->generation);
833 if (head && !atomic_inc_not_zero(&head->count)) {
835 if (!atomic_read(&head->count)) {
836 if (!test_bit(STRIPE_HANDLE, &head->state))
838 BUG_ON(list_empty(&head->lru) &&
839 !test_bit(STRIPE_EXPANDING, &head->state));
843 list_del_init(&head->lru);
846 if (head->group) {
847 head->group->stripes_cnt--;
848 head->group = NULL;
851 atomic_inc(&head->count);
856 if (!head)
858 if (!stripe_can_batch(head))
861 lock_two_stripes(head, sh);
863 if (!stripe_can_batch(head) || !stripe_can_batch(sh))
872 if (head->dev[dd_idx].towrite->bi_opf != sh->dev[dd_idx].towrite->bi_opf ||
873 bio_op(head->dev[dd_idx].towrite) != bio_op(sh->dev[dd_idx].towrite))
876 if (head->batch_head) {
877 spin_lock(&head->batch_head->batch_lock);
879 if (!stripe_can_batch(head)) {
880 spin_unlock(&head->batch_head->batch_lock);
885 * batch_lock, otherwise clear_batch_ready of batch head
890 sh->batch_head = head->batch_head;
893 * at this point, head's BATCH_READY could be cleared, but we
896 list_add(&sh->batch_list, &head->batch_list);
897 spin_unlock(&head->batch_head->batch_lock);
899 head->batch_head = head;
900 sh->batch_head = head->batch_head;
901 spin_lock(&head->batch_lock);
902 list_add_tail(&sh->batch_list, &head->batch_list);
903 spin_unlock(&head->batch_lock);
922 unlock_two_stripes(head, sh);
924 raid5_release_stripe(head);
984 /* temporarily move the head */
4778 * a head which can now be handled.
4838 "head stripe state: %lx\n", head_sh->state);
4888 * the head of batch list or lone stripe can continue. Otherwise we
5291 struct list_head head;
5292 list_add(&head, &conf->bitmap_list);
5294 while (!list_empty(&head)) {
5295 struct stripe_head *sh = list_entry(head.next, struct stripe_head, lru);
5509 * head of the hold_list has changed, i.e. the head was promoted to the
6309 * So we do one stripe head at a time and record in
7370 * Losing a stripe head costs more than the time to refill it,