• Home
  • Raw
  • Download

Lines Matching refs:wpa

402 		struct fuse_writepage_args *wpa;  in fuse_find_writeback()  local
405 wpa = rb_entry(n, struct fuse_writepage_args, writepages_entry); in fuse_find_writeback()
406 WARN_ON(get_fuse_inode(wpa->inode) != fi); in fuse_find_writeback()
407 curr_index = wpa->ia.write.in.offset >> PAGE_SHIFT; in fuse_find_writeback()
408 if (idx_from >= curr_index + wpa->ia.ap.num_pages) in fuse_find_writeback()
413 return wpa; in fuse_find_writeback()
1623 static void fuse_writepage_free(struct fuse_writepage_args *wpa) in fuse_writepage_free() argument
1625 struct fuse_args_pages *ap = &wpa->ia.ap; in fuse_writepage_free()
1631 if (wpa->ia.ff) in fuse_writepage_free()
1632 fuse_file_put(wpa->ia.ff, false, false); in fuse_writepage_free()
1635 kfree(wpa); in fuse_writepage_free()
1639 struct fuse_writepage_args *wpa) in fuse_writepage_finish() argument
1641 struct fuse_args_pages *ap = &wpa->ia.ap; in fuse_writepage_finish()
1642 struct inode *inode = wpa->inode; in fuse_writepage_finish()
1657 struct fuse_writepage_args *wpa, loff_t size) in fuse_send_writepage() argument
1662 struct fuse_inode *fi = get_fuse_inode(wpa->inode); in fuse_send_writepage()
1663 struct fuse_write_in *inarg = &wpa->ia.write.in; in fuse_send_writepage()
1664 struct fuse_args *args = &wpa->ia.ap.args; in fuse_send_writepage()
1665 __u64 data_size = wpa->ia.ap.num_pages * PAGE_SIZE; in fuse_send_writepage()
1697 rb_erase(&wpa->writepages_entry, &fi->writepages); in fuse_send_writepage()
1698 fuse_writepage_finish(fm, wpa); in fuse_send_writepage()
1702 for (aux = wpa->next; aux; aux = next) { in fuse_send_writepage()
1708 fuse_writepage_free(wpa); in fuse_send_writepage()
1725 struct fuse_writepage_args *wpa; in fuse_flush_writepages() local
1728 wpa = list_entry(fi->queued_writes.next, in fuse_flush_writepages()
1730 list_del_init(&wpa->queue_entry); in fuse_flush_writepages()
1731 fuse_send_writepage(fm, wpa, crop); in fuse_flush_writepages()
1736 struct fuse_writepage_args *wpa) in fuse_insert_writeback() argument
1738 pgoff_t idx_from = wpa->ia.write.in.offset >> PAGE_SHIFT; in fuse_insert_writeback()
1739 pgoff_t idx_to = idx_from + wpa->ia.ap.num_pages - 1; in fuse_insert_writeback()
1743 WARN_ON(!wpa->ia.ap.num_pages); in fuse_insert_writeback()
1751 WARN_ON(curr->inode != wpa->inode); in fuse_insert_writeback()
1762 rb_link_node(&wpa->writepages_entry, parent, p); in fuse_insert_writeback()
1763 rb_insert_color(&wpa->writepages_entry, root); in fuse_insert_writeback()
1767 static void tree_insert(struct rb_root *root, struct fuse_writepage_args *wpa) in tree_insert() argument
1769 WARN_ON(fuse_insert_writeback(root, wpa)); in tree_insert()
1775 struct fuse_writepage_args *wpa = in fuse_writepage_end() local
1776 container_of(args, typeof(*wpa), ia.ap.args); in fuse_writepage_end()
1777 struct inode *inode = wpa->inode; in fuse_writepage_end()
1791 rb_erase(&wpa->writepages_entry, &fi->writepages); in fuse_writepage_end()
1792 while (wpa->next) { in fuse_writepage_end()
1794 struct fuse_write_in *inarg = &wpa->ia.write.in; in fuse_writepage_end()
1795 struct fuse_writepage_args *next = wpa->next; in fuse_writepage_end()
1797 wpa->next = next->next; in fuse_writepage_end()
1799 next->ia.ff = fuse_file_get(wpa->ia.ff); in fuse_writepage_end()
1828 fuse_writepage_finish(fm, wpa); in fuse_writepage_end()
1830 fuse_writepage_free(wpa); in fuse_writepage_end()
1885 struct fuse_writepage_args *wpa; in fuse_writepage_args_alloc() local
1888 wpa = kzalloc(sizeof(*wpa), GFP_NOFS); in fuse_writepage_args_alloc()
1889 if (wpa) { in fuse_writepage_args_alloc()
1890 ap = &wpa->ia.ap; in fuse_writepage_args_alloc()
1894 kfree(wpa); in fuse_writepage_args_alloc()
1895 wpa = NULL; in fuse_writepage_args_alloc()
1898 return wpa; in fuse_writepage_args_alloc()
1908 struct fuse_writepage_args *wpa; in fuse_writepage_locked() local
1915 wpa = fuse_writepage_args_alloc(); in fuse_writepage_locked()
1916 if (!wpa) in fuse_writepage_locked()
1918 ap = &wpa->ia.ap; in fuse_writepage_locked()
1925 wpa->ia.ff = fuse_write_file_get(fc, fi); in fuse_writepage_locked()
1926 if (!wpa->ia.ff) in fuse_writepage_locked()
1929 fuse_write_args_fill(&wpa->ia, wpa->ia.ff, page_offset(page), 0); in fuse_writepage_locked()
1932 wpa->ia.write.in.write_flags |= FUSE_WRITE_CACHE; in fuse_writepage_locked()
1933 wpa->next = NULL; in fuse_writepage_locked()
1940 wpa->inode = inode; in fuse_writepage_locked()
1946 tree_insert(&fi->writepages, wpa); in fuse_writepage_locked()
1947 list_add_tail(&wpa->queue_entry, &fi->queued_writes); in fuse_writepage_locked()
1958 kfree(wpa); in fuse_writepage_locked()
1989 struct fuse_writepage_args *wpa; member
1998 struct fuse_args_pages *ap = &data->wpa->ia.ap; in fuse_pages_realloc()
2024 struct fuse_writepage_args *wpa = data->wpa; in fuse_writepages_send() local
2027 int num_pages = wpa->ia.ap.num_pages; in fuse_writepages_send()
2030 wpa->ia.ff = fuse_file_get(data->ff); in fuse_writepages_send()
2032 list_add_tail(&wpa->queue_entry, &fi->queued_writes); in fuse_writepages_send()
2134 struct fuse_writepage_args *wpa = data->wpa; in fuse_writepages_fill() local
2135 struct fuse_args_pages *ap = &wpa->ia.ap; in fuse_writepages_fill()
2149 if (wpa && fuse_writepage_need_send(fc, page, ap, data)) { in fuse_writepages_fill()
2151 data->wpa = NULL; in fuse_writepages_fill()
2172 if (data->wpa == NULL) { in fuse_writepages_fill()
2174 wpa = fuse_writepage_args_alloc(); in fuse_writepages_fill()
2175 if (!wpa) { in fuse_writepages_fill()
2181 ap = &wpa->ia.ap; in fuse_writepages_fill()
2182 fuse_write_args_fill(&wpa->ia, data->ff, page_offset(page), 0); in fuse_writepages_fill()
2183 wpa->ia.write.in.write_flags |= FUSE_WRITE_CACHE; in fuse_writepages_fill()
2184 wpa->next = NULL; in fuse_writepages_fill()
2188 wpa->inode = inode; in fuse_writepages_fill()
2202 if (data->wpa) { in fuse_writepages_fill()
2210 } else if (fuse_writepage_add(wpa, page)) { in fuse_writepages_fill()
2211 data->wpa = wpa; in fuse_writepages_fill()
2234 data.wpa = NULL; in fuse_writepages()
2245 if (data.wpa) { in fuse_writepages()
2246 WARN_ON(!data.wpa->ia.ap.num_pages); in fuse_writepages()