Home
last modified time | relevance | path

Searched refs:frag (Results 1 – 25 of 296) sorted by relevance

12345678910>>...12

/linux/fs/jffs2/
H A Dread.c161 struct jffs2_node_frag *frag; in jffs2_read_inode_range() local
167 frag = jffs2_lookup_node_frag(&f->fragtree, offset); in jffs2_read_inode_range()
177 if (unlikely(!frag || frag->ofs > offset || in jffs2_read_inode_range()
178 frag->ofs + frag->size <= offset)) { in jffs2_read_inode_range()
180 if (frag && frag->ofs > offset) { in jffs2_read_inode_range()
182 f->inocache->ino, frag->ofs, offset); in jffs2_read_inode_range()
183 holesize = min(holesize, frag->ofs - offset); in jffs2_read_inode_range()
191 } else if (unlikely(!frag->node)) { in jffs2_read_inode_range()
192 uint32_t holeend = min(end, frag->ofs + frag->size); in jffs2_read_inode_range()
194 offset, holeend, frag->ofs, in jffs2_read_inode_range()
[all …]
H A Dgc.c500 struct jffs2_node_frag *frag; in jffs2_garbage_collect_live() local
534 for (frag = frag_first(&f->fragtree); frag; frag = frag_next(frag)) { in jffs2_garbage_collect_live()
535 if (frag->node && frag->node->raw == raw) { in jffs2_garbage_collect_live()
536 fn = frag->node; in jffs2_garbage_collect_live()
537 end = frag->ofs + frag->size; in jffs2_garbage_collect_live()
539 start = frag->ofs; in jffs2_garbage_collect_live()
540 if (nrfrags == frag->node->frags) in jffs2_garbage_collect_live()
549 frag->node->raw = f->inocache->nodes; in jffs2_garbage_collect_live()
1018 struct jffs2_node_frag *frag; in jffs2_garbage_collect_hole() local
1083 frag = frag_last(&f->fragtree); in jffs2_garbage_collect_hole()
[all …]
H A Dnodelist.c61 struct jffs2_node_frag *frag = jffs2_lookup_node_frag(list, size); in jffs2_truncate_fragtree() local
66 if (frag && frag->ofs != size) { in jffs2_truncate_fragtree()
67 if (frag->ofs+frag->size > size) { in jffs2_truncate_fragtree()
68 frag->size = size - frag->ofs; in jffs2_truncate_fragtree()
70 frag = frag_next(frag); in jffs2_truncate_fragtree()
72 while (frag && frag->ofs >= size) { in jffs2_truncate_fragtree()
73 struct jffs2_node_frag *next = frag_next(frag); in jffs2_truncate_fragtree()
75 frag_erase(frag, list); in jffs2_truncate_fragtree()
76 jffs2_obsolete_node_frag(c, frag); in jffs2_truncate_fragtree()
77 frag = next; in jffs2_truncate_fragtree()
[all …]
H A Dnodelist.h347 #define frag_next(frag) rb_entry(rb_next(&(frag)->rb), struct jffs2_node_frag, rb) argument
348 #define frag_prev(frag) rb_entry(rb_prev(&(frag)->rb), struct jffs2_node_frag, rb) argument
349 #define frag_parent(frag) rb_entry(rb_parent(&(frag)->rb), struct jffs2_node_frag, rb) argument
350 #define frag_left(frag) rb_entry((frag)->rb.rb_left, struct jffs2_node_frag, rb) argument
351 #define frag_right(frag) rb_entry((frag)->rb.rb_right, struct jffs2_node_frag, rb) argument
352 #define frag_erase(frag, list) rb_erase(&frag->rb, list) argument
/linux/net/ieee802154/6lowpan/
H A Dtx.c105 struct sk_buff *frag; in lowpan_alloc_frag() local
108 frag = alloc_skb(wdev->needed_headroom + wdev->needed_tailroom + size, in lowpan_alloc_frag()
111 if (likely(frag)) { in lowpan_alloc_frag()
112 frag->dev = wdev; in lowpan_alloc_frag()
113 frag->priority = skb->priority; in lowpan_alloc_frag()
114 skb_reserve(frag, wdev->needed_headroom); in lowpan_alloc_frag()
115 skb_reset_network_header(frag); in lowpan_alloc_frag()
116 *mac_cb(frag) = *mac_cb(skb); in lowpan_alloc_frag()
119 skb_put_data(frag, skb_mac_header(skb), skb->mac_len); in lowpan_alloc_frag()
121 rc = wpan_dev_hard_header(frag, wdev, in lowpan_alloc_frag()
[all …]
/linux/fs/configfs/
H A Dfile.c58 struct configfs_fragment *frag = to_frag(file); in fill_read_buffer() local
66 down_read(&frag->frag_sem); in fill_read_buffer()
67 if (!frag->frag_dead) in fill_read_buffer()
69 up_read(&frag->frag_sem); in fill_read_buffer()
109 struct configfs_fragment *frag = to_frag(file); in configfs_bin_read_iter() local
125 down_read(&frag->frag_sem); in configfs_bin_read_iter()
126 if (!frag->frag_dead) in configfs_bin_read_iter()
130 up_read(&frag->frag_sem); in configfs_bin_read_iter()
150 down_read(&frag->frag_sem); in configfs_bin_read_iter()
151 if (!frag->frag_dead) in configfs_bin_read_iter()
[all …]
/linux/lib/kunit/
H A Dstring-stream.c19 struct string_stream_fragment *frag; in alloc_string_stream_fragment() local
21 frag = kzalloc(sizeof(*frag), gfp); in alloc_string_stream_fragment()
22 if (!frag) in alloc_string_stream_fragment()
25 frag->fragment = kmalloc(len, gfp); in alloc_string_stream_fragment()
26 if (!frag->fragment) { in alloc_string_stream_fragment()
27 kfree(frag); in alloc_string_stream_fragment()
31 return frag; in alloc_string_stream_fragment()
34 static void string_stream_fragment_destroy(struct string_stream_fragment *frag) in string_stream_fragment_destroy() argument
36 list_del(&frag->node); in string_stream_fragment_destroy()
37 kfree(frag->fragment); in string_stream_fragment_destroy()
[all …]
/linux/drivers/misc/mei/
H A Dvsc-fw-loader.c417 struct vsc_img_frag *frag; in vsc_identify_csi_image() local
434 frag = &fw_loader->frags[csi_image_map[i].frag_index]; in vsc_identify_csi_image()
436 frag->data = sign->image; in vsc_identify_csi_image()
437 frag->size = le32_to_cpu(sign->image_size); in vsc_identify_csi_image()
438 frag->location = le32_to_cpu(img->image_location[i]); in vsc_identify_csi_image()
439 frag->type = csi_image_map[i].image_type; in vsc_identify_csi_image()
497 struct vsc_img_frag *frag, *last_frag; in vsc_identify_ace_image() local
511 frag = &fw_loader->frags[frag_index]; in vsc_identify_ace_image()
513 frag->data = sign->image; in vsc_identify_ace_image()
514 frag->size = le32_to_cpu(sign->image_size); in vsc_identify_ace_image()
[all …]
/linux/net/rds/
H A Dib_recv.c160 struct rds_page_frag *frag; in rds_ib_recv_free_caches() local
179 list_for_each_entry_safe(frag, frag_tmp, &list, f_cache_entry) { in rds_ib_recv_free_caches()
180 list_del(&frag->f_cache_entry); in rds_ib_recv_free_caches()
181 WARN_ON(!list_empty(&frag->f_item)); in rds_ib_recv_free_caches()
182 kmem_cache_free(rds_ib_frag_slab, frag); in rds_ib_recv_free_caches()
194 struct rds_page_frag *frag) in rds_ib_frag_free() argument
196 rdsdebug("frag %p page %p\n", frag, sg_page(&frag->f_sg)); in rds_ib_frag_free()
198 rds_ib_recv_cache_put(&frag->f_cache_entry, &ic->i_cache_frags); in rds_ib_frag_free()
207 struct rds_page_frag *frag; in rds_ib_inc_free() local
214 list_for_each_entry_safe(frag, pos, &ibinc->ii_frags, f_item) { in rds_ib_inc_free()
[all …]
/linux/fs/ceph/
H A Dinode.c262 struct ceph_inode_frag *frag; in __get_or_create_frag() local
268 frag = rb_entry(parent, struct ceph_inode_frag, node); in __get_or_create_frag()
269 c = ceph_frag_compare(f, frag->frag); in __get_or_create_frag()
275 return frag; in __get_or_create_frag()
278 frag = kmalloc(sizeof(*frag), GFP_NOFS); in __get_or_create_frag()
279 if (!frag) in __get_or_create_frag()
282 frag->frag = f; in __get_or_create_frag()
283 frag->split_by = 0; in __get_or_create_frag()
284 frag->mds = -1; in __get_or_create_frag()
285 frag->ndist = 0; in __get_or_create_frag()
[all …]
/linux/fs/adfs/
H A Dmap.c76 u32 frag; in lookup_zone() local
78 frag = GET_FRAG_ID(map, 8, idmask & 0x7fff); in lookup_zone()
79 freelink = frag ? 8 + frag : 0; in lookup_zone()
82 frag = GET_FRAG_ID(map, start, idmask); in lookup_zone()
89 freelink += frag & 0x7fff; in lookup_zone()
90 } else if (frag == frag_id) { in lookup_zone()
104 frag, start, fragend); in lookup_zone()
123 u32 frag; in scan_free_map() local
129 frag = GET_FRAG_ID(map, start, idmask); in scan_free_map()
135 if (frag == 0) in scan_free_map()
[all …]
/linux/net/tipc/
H A Dmsg.c127 struct sk_buff *frag = *buf; in tipc_buf_append() local
134 if (!frag) in tipc_buf_append()
137 msg = buf_msg(frag); in tipc_buf_append()
139 frag->next = NULL; in tipc_buf_append()
140 skb_pull(frag, msg_hdr_sz(msg)); in tipc_buf_append()
145 if (skb_has_frag_list(frag) && __skb_linearize(frag)) in tipc_buf_append()
148 frag = skb_unshare(frag, GFP_ATOMIC); in tipc_buf_append()
149 if (unlikely(!frag)) in tipc_buf_append()
151 head = *headbuf = frag; in tipc_buf_append()
164 if (skb_try_coalesce(head, frag, &headstolen, &delta)) { in tipc_buf_append()
[all …]
/linux/net/tls/
H A Dtls_strp.c54 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; in tls_strp_skb_copy() local
57 skb_frag_address(frag), in tls_strp_skb_copy()
58 skb_frag_size(frag))); in tls_strp_skb_copy()
59 offset += skb_frag_size(frag); in tls_strp_skb_copy()
215 skb_frag_t *frag; in tls_strp_copyin_frag() local
218 frag = &skb_shinfo(skb)->frags[skb->len / PAGE_SIZE]; in tls_strp_copyin_frag()
224 chunk = min_t(size_t, len, PAGE_SIZE - skb_frag_size(frag)); in tls_strp_copyin_frag()
226 skb_frag_address(frag) + in tls_strp_copyin_frag()
227 skb_frag_size(frag), in tls_strp_copyin_frag()
232 skb_frag_size_add(frag, chunk); in tls_strp_copyin_frag()
[all …]
/linux/net/core/
H A Dtso.c54 skb_frag_t *frag = &skb_shinfo(skb)->frags[tso->next_frag_idx]; in tso_build_data() local
57 tso->size = skb_frag_size(frag); in tso_build_data()
58 tso->data = skb_frag_address(frag); in tso_build_data()
80 skb_frag_t *frag = &skb_shinfo(skb)->frags[tso->next_frag_idx]; in tso_start() local
83 tso->size = skb_frag_size(frag); in tso_start()
84 tso->data = skb_frag_address(frag); in tso_start()
H A Ddatagram.c416 const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; in __skb_datagram_iter() local
420 end = start + skb_frag_size(frag); in __skb_datagram_iter()
430 skb_frag_foreach_page(frag, in __skb_datagram_iter()
431 skb_frag_off(frag) + offset - start, in __skb_datagram_iter()
574 const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; in skb_copy_datagram_from_iter() local
578 end = start + skb_frag_size(frag); in skb_copy_datagram_from_iter()
584 copied = copy_page_from_iter(skb_frag_page(frag), in skb_copy_datagram_from_iter()
585 skb_frag_off(frag) + offset - start, in skb_copy_datagram_from_iter()
627 int frag = skb_shinfo(skb)->nr_frags; in zerocopy_fill_skb_from_iter() local
639 if (frag == MAX_SKB_FRAGS) in zerocopy_fill_skb_from_iter()
[all …]
/linux/net/ipv6/
H A Dip6_output.c713 iter->frag = skb_shinfo(skb)->frag_list; in ip6_fraglist_init()
744 struct sk_buff *frag = iter->frag; in ip6_fraglist_prepare() local
748 frag->ip_summed = CHECKSUM_NONE; in ip6_fraglist_prepare()
749 skb_reset_transport_header(frag); in ip6_fraglist_prepare()
750 fh = __skb_push(frag, sizeof(struct frag_hdr)); in ip6_fraglist_prepare()
751 __skb_push(frag, hlen); in ip6_fraglist_prepare()
752 skb_reset_network_header(frag); in ip6_fraglist_prepare()
753 memcpy(skb_network_header(frag), iter->tmp_hdr, hlen); in ip6_fraglist_prepare()
758 if (frag->next) in ip6_fraglist_prepare()
761 ipv6_hdr(frag)->payload_len = htons(frag->len - sizeof(struct ipv6hdr)); in ip6_fraglist_prepare()
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A Dipoib_rx.c26 void *frag; in prepare_frag_skb() local
30 frag = napi_alloc_frag(skb_size); in prepare_frag_skb()
32 if (unlikely(!frag)) in prepare_frag_skb()
35 skb = build_skb(frag, skb_size); in prepare_frag_skb()
38 skb_free_frag(frag); in prepare_frag_skb()
/linux/include/linux/
H A Dskbuff_ref.h18 static inline void __skb_frag_ref(skb_frag_t *frag) in __skb_frag_ref() argument
20 get_page(skb_frag_page(frag)); in __skb_frag_ref()
54 static inline void __skb_frag_unref(skb_frag_t *frag, bool recycle) in __skb_frag_unref() argument
56 skb_page_unref(skb_frag_netmem(frag), recycle); in __skb_frag_unref()
/linux/drivers/net/ethernet/netronome/nfp/nfdk/
H A Drings.c17 const skb_frag_t *frag, *fend; in nfp_nfdk_tx_ring_reset() local
41 frag = skb_shinfo(skb)->frags; in nfp_nfdk_tx_ring_reset()
42 fend = frag + nr_frags; in nfp_nfdk_tx_ring_reset()
43 for (; frag < fend; frag++) { in nfp_nfdk_tx_ring_reset()
44 size = skb_frag_size(frag); in nfp_nfdk_tx_ring_reset()
46 skb_frag_size(frag), DMA_TO_DEVICE); in nfp_nfdk_tx_ring_reset()
/linux/arch/powerpc/mm/book3s64/
H A Dmmu_context.c263 void *frag; in destroy_pagetable_cache() local
265 frag = mm->context.pte_frag; in destroy_pagetable_cache()
266 if (frag) in destroy_pagetable_cache()
267 pte_frag_destroy(frag); in destroy_pagetable_cache()
269 frag = mm->context.pmd_frag; in destroy_pagetable_cache()
270 if (frag) in destroy_pagetable_cache()
271 pmd_frag_destroy(frag); in destroy_pagetable_cache()
/linux/fs/ufs/
H A Dutil.h454 struct ufs_cg_private_info *ucpi, unsigned int frag) in ubh_isblockset() argument
457 u8 *p = ubh_get_addr(ubh, ucpi->c_freeoff + (frag >> 3)); in ubh_isblockset()
464 mask = 0x0f << (frag & 4); in ubh_isblockset()
467 mask = 0x03 << (frag & 6); in ubh_isblockset()
470 mask = 0x01 << (frag & 7); in ubh_isblockset()
477 struct ufs_cg_private_info *ucpi, unsigned int frag) in ubh_clrblock() argument
480 u8 *p = ubh_get_addr(ubh, ucpi->c_freeoff + (frag >> 3)); in ubh_clrblock()
487 *p &= ~(0x0f << (frag & 4)); in ubh_clrblock()
490 *p &= ~(0x03 << (frag & 6)); in ubh_clrblock()
493 *p &= ~(0x01 << (frag & 7)); in ubh_clrblock()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_net_dp.c19 void *frag; in nfp_net_rx_alloc_one() local
22 frag = netdev_alloc_frag(dp->fl_bufsz); in nfp_net_rx_alloc_one()
27 frag = page ? page_address(page) : NULL; in nfp_net_rx_alloc_one()
29 if (!frag) { in nfp_net_rx_alloc_one()
34 *dma_addr = nfp_net_dma_map_rx(dp, frag); in nfp_net_rx_alloc_one()
36 nfp_net_free_frag(frag, dp->xdp_prog); in nfp_net_rx_alloc_one()
41 return frag; in nfp_net_rx_alloc_one()
145 if (!rx_ring->rxbufs[i].frag) in nfp_net_rx_ring_bufs_free()
149 nfp_net_free_frag(rx_ring->rxbufs[i].frag, dp->xdp_prog); in nfp_net_rx_ring_bufs_free()
151 rx_ring->rxbufs[i].frag = NULL; in nfp_net_rx_ring_bufs_free()
[all …]
/linux/net/ipv4/
H A Dip_output.c605 iter->frag = skb_shinfo(skb)->frag_list; in ip_fraglist_init()
624 struct sk_buff *frag; in ip_fraglist_prepare() local
626 frag = iter->frag; in ip_fraglist_prepare()
627 frag->ip_summed = CHECKSUM_NONE; in ip_fraglist_prepare()
628 skb_reset_transport_header(frag); in ip_fraglist_prepare()
629 __skb_push(frag, hlen); in ip_fraglist_prepare()
630 skb_reset_network_header(frag); in ip_fraglist_prepare()
631 memcpy(skb_network_header(frag), iph, hlen); in ip_fraglist_prepare()
632 iter->iph = ip_hdr(frag); in ip_fraglist_prepare()
634 iph->tot_len = htons(frag->len); in ip_fraglist_prepare()
[all …]
/linux/drivers/net/ethernet/netronome/nfp/nfd3/
H A Drings.c45 const skb_frag_t *frag; in nfp_nfd3_tx_ring_reset() local
64 frag = &skb_shinfo(skb)->frags[tx_buf->fidx]; in nfp_nfd3_tx_ring_reset()
66 skb_frag_size(frag), DMA_TO_DEVICE); in nfp_nfd3_tx_ring_reset()
169 if (!tx_ring->txbufs[i].frag) in nfp_nfd3_tx_ring_bufs_free()
173 __free_page(virt_to_page(tx_ring->txbufs[i].frag)); in nfp_nfd3_tx_ring_bufs_free()
188 txbufs[i].frag = nfp_net_rx_alloc_one(dp, &txbufs[i].dma_addr); in nfp_nfd3_tx_ring_bufs_alloc()
189 if (!txbufs[i].frag) { in nfp_nfd3_tx_ring_bufs_alloc()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_vm_pt.c758 unsigned int *frag, uint64_t *frag_end) in amdgpu_vm_pte_fragment() argument
790 *frag = 0; in amdgpu_vm_pte_fragment()
796 *frag = min_t(unsigned int, ffs(start) - 1, fls64(end - start) - 1); in amdgpu_vm_pte_fragment()
797 if (*frag >= max_frag) { in amdgpu_vm_pte_fragment()
798 *frag = max_frag; in amdgpu_vm_pte_fragment()
801 *frag_end = start + (1 << *frag); in amdgpu_vm_pte_fragment()
826 unsigned int frag; in amdgpu_vm_ptes_update() local
830 amdgpu_vm_pte_fragment(params, frag_start, end, flags, &frag, in amdgpu_vm_ptes_update()
864 } else if (frag < shift) { in amdgpu_vm_ptes_update()
871 } else if (frag >= parent_shift) { in amdgpu_vm_ptes_update()
[all …]

12345678910>>...12