Lines Matching refs:head
181 * nfs_folio_find_private_request - find head request associated with a folio
186 * returns matching head request with reference held, or NULL if not found.
226 * nfs_folio_find_head_request - find head request associated with a folio
229 * returns matching head request with reference held, or NULL if not found.
244 struct nfs_page *req, *head;
251 head = nfs_page_group_lock_head(req);
252 if (head != req)
254 if (IS_ERR(head))
255 return head;
256 ret = nfs_cancel_remove_inode(head, inode);
258 nfs_unlock_and_release_request(head);
262 if (head == nfs_folio_private_request(folio))
266 nfs_unlock_and_release_request(head);
268 return head;
324 * @head - head request of page group
327 * Search page group with head @head to find a request that contains the
336 nfs_page_group_search_locked(struct nfs_page *head, unsigned int page_offset)
340 req = head;
347 } while (req != head);
354 * @head - head request of page group
356 * Return true if the page group with head @head covers the whole page,
443 * @old_head - the old head of the list
496 * nfs_join_page_group - destroy subrequests of the head req
497 * @head: the page used to lookup the "page group" of nfs_page structures
500 * This function joins all sub requests to the head request by first
502 * and finally updating the head request to cover the whole range covered by
506 void nfs_join_page_group(struct nfs_page *head, struct nfs_commit_info *cinfo,
513 pgbase = head->wb_pgbase;
514 bytes = head->wb_bytes;
515 off = head->wb_offset;
516 for (subreq = head->wb_this_page; subreq != head;
528 /* Set the head request's range to cover the former page group */
529 head->wb_pgbase = pgbase;
530 head->wb_bytes = bytes;
531 head->wb_offset = off;
535 subreq = head;
539 } while (subreq != head);
541 /* unlink subrequests from head, destroy them later */
542 if (head->wb_this_page != head) {
543 /* destroy list will be terminated by head */
544 destroy_list = head->wb_this_page;
545 head->wb_this_page = head;
548 nfs_destroy_unlinked_subrequests(destroy_list, head, inode);
552 * nfs_lock_and_join_requests - join all subreqs to the head req
555 * This function joins all sub requests to the head request by first
557 * and finally updating the head request to cover the whole range covered by
561 * Returns a locked, referenced pointer to the head request - which after
569 struct nfs_page *head;
575 * A reference is taken only on the head request which acts as a
577 * until the head reference is released.
579 head = nfs_folio_find_and_lock_request(folio);
580 if (IS_ERR_OR_NULL(head))
581 return head;
584 ret = nfs_page_group_lock_subrequests(head);
586 nfs_unlock_and_release_request(head);
590 nfs_join_page_group(head, &cinfo, inode);
592 return head;
780 /* this a head request for a page group - mark it as having an
824 * Search through commit lists on @inode for the head request for @folio.
827 * Returns the head request if found, or NULL if not found.
856 * @dst: commit list head
1424 /* If a nfs_flush_* function fails, it should remove reqs from @head and
1440 static void nfs_async_write_error(struct list_head *head, int error)
1444 while (!list_empty(head)) {
1445 req = nfs_list_entry(head->next);
1727 static loff_t nfs_get_lwb(struct list_head *head)
1732 list_for_each_entry(req, head, wb_list)
1743 struct list_head *head,
1754 if (head)
1755 list_splice_init(head, &data->pages);
1812 nfs_commit_list(struct inode *inode, struct list_head *head, int how,
1819 if (list_empty(head))
1824 nfs_retry_commit(head, NULL, cinfo, -1);
1829 nfs_init_commit(data, head, NULL, cinfo);
1925 int nfs_generic_commit_list(struct inode *inode, struct list_head *head,
1930 status = pnfs_commit_list(inode, head, how, cinfo);
1932 status = nfs_commit_list(inode, head, how, cinfo);
1939 LIST_HEAD(head);
1948 ret = nscan = nfs_scan_commit(inode, &head, &cinfo);
1951 ret = nfs_generic_commit_list(inode, &head, how, &cinfo);
2063 /* blocking call to cancel all requests and join to a single (head)
2071 * nfs_lock_and_join_requests, so just remove the head