• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/ntfs-3g-2009.3.8/libntfs-3g/

Lines Matching defs:ih

205 static INDEX_ENTRY *ntfs_ie_get_first(INDEX_HEADER *ih)
207 return (INDEX_ENTRY *)((u8 *)ih + le32_to_cpu(ih->entries_offset));
215 static u8 *ntfs_ie_get_end(INDEX_HEADER *ih)
218 return (u8 *)ih + le32_to_cpu(ih->index_length);
239 static INDEX_ENTRY *ntfs_ie_get_by_pos(INDEX_HEADER *ih, int pos)
245 ie = ntfs_ie_get_first(ih);
253 static INDEX_ENTRY *ntfs_ie_prev(INDEX_HEADER *ih, INDEX_ENTRY *ie)
260 tmp = ntfs_ie_get_first(ih);
287 void ntfs_ih_filename_dump(INDEX_HEADER *ih)
293 ie = ntfs_ie_get_first(ih);
300 static int ntfs_ih_numof_entries(INDEX_HEADER *ih)
308 end = ntfs_ie_get_end(ih);
309 ie = ntfs_ie_get_first(ih);
315 static int ntfs_ih_one_entry(INDEX_HEADER *ih)
317 return (ntfs_ih_numof_entries(ih) == 1);
320 static int ntfs_ih_zero_entry(INDEX_HEADER *ih)
322 return (ntfs_ih_numof_entries(ih) == 0);
325 static void ntfs_ie_delete(INDEX_HEADER *ih, INDEX_ENTRY *ie)
331 new_size = le32_to_cpu(ih->index_length) - le16_to_cpu(ie->length);
332 ih->index_length = cpu_to_le32(new_size);
334 new_size - ((u8 *)ie - (u8 *)ih));
343 * Insert @ie index entry at @pos entry. Used @ih values should be ok already.
345 static void ntfs_ie_insert(INDEX_HEADER *ih, INDEX_ENTRY *ie, INDEX_ENTRY *pos)
351 ih->index_length = cpu_to_le32(le32_to_cpu(ih->index_length) + ie_size);
353 le32_to_cpu(ih->index_length) - ((u8 *)pos - (u8 *)ih) - ie_size);
483 ntfs_index_context *icx, INDEX_HEADER *ih,
492 index_end = ntfs_ie_get_end(ih);
498 for (ie = ntfs_ie_get_first(ih); ; ie = ntfs_ie_get_next(ie)) {
828 static INDEX_ENTRY *ntfs_ie_get_median(INDEX_HEADER *ih)
836 ie = ie_start = ntfs_ie_get_first(ih);
837 ie_end = (u8 *)ntfs_ie_get_end(ih);
1263 static int ntfs_ih_insert(INDEX_HEADER *ih, INDEX_ENTRY *orig_ie, VCN new_vcn,
1280 ie_node = ntfs_ie_get_by_pos(ih, pos);
1284 ntfs_ie_insert(ih, ie, ie_node);
1424 INDEX_HEADER *ih;
1448 ih = &icx->ir->index;
1450 ih = &icx->ib->index;
1452 allocated_size = le32_to_cpu(ih->allocated_size);
1453 new_size = le32_to_cpu(ih->index_length) + le16_to_cpu(ie->length);
1473 ntfs_ie_insert(ih, ie, icx->entry);
1530 static int ntfs_ih_takeout(ntfs_index_context *icx, INDEX_HEADER *ih,
1542 ntfs_ie_delete(ih, ie);
1562 static void ntfs_ir_leafify(ntfs_index_context *icx, INDEX_HEADER *ih)
1568 ie = ntfs_ie_get_first(ih);
1572 ih->index_length = cpu_to_le32(le32_to_cpu(ih->index_length) - sizeof(VCN));
1573 ih->ih_flags &= ~LARGE_INDEX;
1576 ntfs_ir_truncate(icx, le32_to_cpu(ih->index_length));
1583 static int ntfs_ih_reparent_end(ntfs_index_context *icx, INDEX_HEADER *ih,
1590 ie = ntfs_ie_get_by_pos(ih, ntfs_icx_parent_pos(icx));
1591 ie_prev = ntfs_ie_prev(ih, ie);
1595 return ntfs_ih_takeout(icx, ih, ie_prev, ib);
1658 INDEX_HEADER *ih;
1709 ih = &icx->ir->index;
1711 ih = &icx->ib->index;
1714 new_size = le32_to_cpu(ih->index_length) + delta;
1721 ih = &icx->ir->index;
1722 entry = ntfs_ie_get_by_pos(ih, entry_pos);
1724 } else if (new_size > le32_to_cpu(ih->allocated_size)) {
1733 ntfs_ie_delete(ih, entry);
1734 ntfs_ie_insert(ih, ie, entry);
1772 INDEX_HEADER *ih;
1783 ih = &icx->ir->index;
1785 ih = &icx->ib->index;
1791 } else if (icx->is_in_root || !ntfs_ih_one_entry(ih)) {
1793 ntfs_ie_delete(ih, icx->entry);
1796 err = ntfs_ir_truncate(icx, le32_to_cpu(ih->index_length));