Lines Matching refs:al_entry

685 		ctx->al_entry = NULL;
940 * the mft record in which @ctx->a is located and @ctx->al_entry is set to
947 * located, i.e. the base mft record, and @ctx->al_entry is set to point to the
955 * attribute list attribute at @ctx->al_entry.
980 ATTR_LIST_ENTRY *al_entry, *next_al_entry;
1007 if (!ctx->al_entry)
1008 ctx->al_entry = (ATTR_LIST_ENTRY*)al_start;
1010 * Iterate over entries in attribute list starting at @ctx->al_entry,
1015 al_entry = ctx->al_entry;
1018 al_entry = (ATTR_LIST_ENTRY*)((u8*)ctx->al_entry +
1019 le16_to_cpu(ctx->al_entry->length));
1020 for (;; al_entry = next_al_entry) {
1022 if ((u8*)al_entry < base_ni->attr_list ||
1023 (u8*)al_entry > al_end)
1025 ctx->al_entry = al_entry;
1027 if ((u8*)al_entry == al_end)
1029 if (!al_entry->length)
1031 if ((u8*)al_entry + 6 > al_end || (u8*)al_entry +
1032 le16_to_cpu(al_entry->length) > al_end)
1034 next_al_entry = (ATTR_LIST_ENTRY*)((u8*)al_entry +
1035 le16_to_cpu(al_entry->length));
1036 if (al_entry->type != type) {
1037 if (le32_to_cpu(al_entry->type) < le32_to_cpu(type))
1046 al_name_len = al_entry->name_length;
1047 al_name = (ntfschar*)((u8*)al_entry + al_entry->name_offset);
1096 next_al_entry->type == al_entry->type &&
1105 if (MREF_LE(al_entry->mft_reference) == ni->mft_no) {
1106 if (MSEQNO_LE(al_entry->mft_reference) != ni->seq_no) {
1120 if (MREF_LE(al_entry->mft_reference) ==
1128 al_entry->mft_reference), &ni,
1136 MREF_LE(al_entry->
1154 * al_entry.
1177 if (al_entry->instance != a->instance)
1184 if (al_entry->type != a->type)
1239 * preserve @ctx->al_entry we cannot reinitialize the search context
1240 * using ntfs_attr_search_ctx_reinit() as this would set @ctx->al_entry
1293 * If an attribute list attribute is present, @ctx->al_entry is the attribute
1299 * list attribute is present, @ctx->al_entry is the attribute list entry which
1538 ATTR_LIST_ENTRY *al_entry;
1567 al_entry = ctx->al_entry;
1568 if (!al_entry)
1569 panic("%s(): !al_entry\n", __FUNCTION__);
1644 err = ntfs_attr_list_is_needed(base_ni, al_entry, &al_needed);
1686 al_ofs = (u8*)al_entry - base_ni->attr_list;
1687 ntfs_attr_list_entry_delete(base_ni, al_entry);
2426 ATTR_LIST_ENTRY *al_entry;
2564 al_entry = NULL;
2624 al_entry = ctx->al_entry;
2630 if ((u8*)al_entry < ni->attr_list ||
2631 (u8*)al_entry > ni->attr_list + new_al_size ||
2632 (u8*)al_entry + al_entry_len >
2679 al_entry_ofs = (u8*)al_entry - al;
2682 if ((u8*)al_entry < al_end)
2686 al_entry = ctx->al_entry = (ATTR_LIST_ENTRY*)(tmp +
2691 } else if ((u8*)al_entry < ni->attr_list + ni->attr_list_size)
2692 memmove((u8*)al_entry + al_entry_len, al_entry,
2693 ni->attr_list_size - ((u8*)al_entry -
2697 al_entry->type = type;
2698 al_entry->length = cpu_to_le16(al_entry_len);
2699 al_entry->name_length = name_len;
2700 al_entry->name_offset = offsetof(ATTR_LIST_ENTRY, name);
2701 al_entry->lowest_vcn = 0;
2702 al_entry->mft_reference = MK_LE_MREF(ctx->ni->mft_no, ctx->ni->seq_no);
2703 al_entry->instance = a->instance;
2706 memcpy((u8*)&al_entry->name, name,
2713 memset((u8*)al_entry + al_entry_used, 0,
2721 (u8*)al_entry - ni->attr_list, ctx);
2804 al_entry_added ? al_entry : NULL, &al_needed);
2849 ntfs_attr_list_entry_delete(ni, al_entry);
3206 ATTR_LIST_ENTRY *al_entry;
3287 al_entry = (ATTR_LIST_ENTRY*)base_ni->attr_list;
3293 if ((u8*)al_entry >= al_end || !al_entry->length) {
3305 if (al_entry->mft_reference == mref &&
3306 al_entry->instance == a->instance) {
3312 if (al_entry->type == a->type &&
3314 (ntfschar*)((u8*)al_entry +
3315 al_entry->name_offset),
3316 al_entry->name_length, a_name,
3334 al_entry = (ATTR_LIST_ENTRY*)((u8*)al_entry +
3335 le16_to_cpu(al_entry->length));
3339 al_entry, &ctx, NULL);
3357 if ((u8*)al_entry - base_ni->attr_list < (long)al_ofs) {
3358 al_ofs = (u8*)al_entry - base_ni->attr_list;
3557 * @al_entry: attribute list entry of the attribute to move
3562 * @al_entry from its mft record to a newly allocated extent mft record and
3573 ntfs_attr_search_ctx *al_ctx, ATTR_LIST_ENTRY *al_entry,
3585 (unsigned)le32_to_cpu(al_entry->type));
3629 al_entry->mft_reference = MK_LE_MREF(ni->mft_no, ni->seq_no);
3630 a->instance = al_entry->instance = m->next_attr_instance;
3787 ctx->al_entry->mft_reference = MK_LE_MREF(ni->mft_no, ni->seq_no);
3788 a->instance = ctx->al_entry->instance = m->next_attr_instance;
3805 ofs = (u8*)ctx->al_entry - base_ni->attr_list;
3809 le16_to_cpu(ctx->al_entry->length));
3819 ATTR_LIST_ENTRY *al_entry;
3821 al_entry = (ATTR_LIST_ENTRY*)((u8*)a +
3823 ((u8*)ctx->al_entry - base_ni->attr_list));
3824 al_entry->mft_reference = ctx->al_entry->mft_reference;
3825 al_entry->instance = ctx->al_entry->instance;
4531 ATTR_LIST_ENTRY *al_entry;
4866 al_entry = ctx->al_entry = (ATTR_LIST_ENTRY*)((u8*)ctx->al_entry +
4867 le16_to_cpu(ctx->al_entry->length));
4871 if ((u8*)al_entry < base_ni->attr_list || (u8*)al_entry >
4872 base_ni->attr_list + new_al_size || (u8*)al_entry +
4915 al_entry_ofs = (u8*)al_entry - al;
4918 if ((u8*)al_entry < al_end)
4922 al_entry = ctx->al_entry = (ATTR_LIST_ENTRY*)(tmp +
4928 } else if ((u8*)al_entry < base_ni->attr_list +
4930 memmove((u8*)al_entry + al_entry_len, al_entry,
4931 base_ni->attr_list_size - ((u8*)al_entry -
4935 al_entry->type = a->type = ni->type;
4936 al_entry->length = cpu_to_le16(al_entry_len);
4938 al_entry->name_length = a->name_length = ni->name_len;
4941 al_entry->name_offset = offsetof(ATTR_LIST_ENTRY, name);
4942 al_entry->instance = a->instance = m->next_attr_instance;
4949 al_entry->lowest_vcn = a->lowest_vcn = cpu_to_sle64(stop_vcn);
4951 al_entry->mft_reference = MK_LE_MREF(eni->mft_no, eni->seq_no);
4957 memcpy(&al_entry->name, ni->name, name_size);
4961 memset((u8*)al_entry + offsetof(ATTR_LIST_ENTRY, name) +
4969 (u8*)al_entry - base_ni->attr_list, ctx);
6645 * @actx->al_entry as this is not going to be touched at all.
6649 actx->al_entry = NULL;
6784 ATTR_LIST_ENTRY *al_entry;
7004 al_entry = actx->al_entry = (ATTR_LIST_ENTRY*)(
7005 (u8*)actx->al_entry +
7006 le16_to_cpu(actx->al_entry->length));
7011 if ((u8*)al_entry < base_ni->attr_list || (u8*)al_entry >
7013 (u8*)al_entry + al_entry_len >
7098 al_entry_ofs = (u8*)al_entry - al;
7101 if ((u8*)al_entry < al_end)
7106 al_entry = actx->al_entry = (ATTR_LIST_ENTRY*)(tmp +
7112 } else if ((u8*)al_entry < base_ni->attr_list +
7114 memmove((u8*)al_entry + al_entry_len, al_entry,
7116 ((u8*)al_entry - base_ni->attr_list));
7119 al_entry->type = a->type = ni->type;
7120 al_entry->length = cpu_to_le16(al_entry_len);
7122 al_entry->name_length = a->name_length = ni->name_len;
7125 al_entry->name_offset = offsetof(ATTR_LIST_ENTRY, name);
7126 al_entry->instance = a->instance = m->next_attr_instance;
7133 al_entry->lowest_vcn = a->lowest_vcn =
7135 al_entry->mft_reference = MK_LE_MREF(actx->ni->mft_no,
7142 memcpy(&al_entry->name, ni->name, name_size);
7146 memset((u8*)al_entry +
7161 (u8*)al_entry - base_ni->attr_list, actx);
7219 al_entry_len = le16_to_cpu(actx->al_entry->length);
7503 ntfs_attr_list_entry_delete(base_ni, actx->al_entry);
7674 ATTR_LIST_ENTRY *al_entry;
7996 * @actx->al_entry as this is not going to be touched at all.
8000 actx->al_entry = NULL;
8488 del_al_start = (u8*)actx->al_entry;
8498 al_entry = (ATTR_LIST_ENTRY*)del_al_start;
8504 al_entry = (ATTR_LIST_ENTRY*)del_al_start;
8513 * allocated size it means that @al_entry points to the attribute list
8518 if ((u8*)al_entry + sizeof(ATTR_LIST_ENTRY) >= al_end ||
8519 (u8*)al_entry < base_ni->attr_list) {
8532 if (MREF_LE(al_entry->mft_reference) == base_ni->mft_no) {
8534 if (MSEQNO_LE(al_entry->mft_reference) !=
8550 le64_to_cpu(al_entry->mft_reference),
8558 al_entry->mft_reference),
8582 if (al_entry->instance == a->instance) {
8588 if (al_entry->type != a->type)
8593 (ntfschar*)((u8*)al_entry +
8594 al_entry->name_offset),
8595 al_entry->name_length,
8644 al_entry = (ATTR_LIST_ENTRY*)((u8*)al_entry +
8645 le16_to_cpu(al_entry->length));
8651 if ((u8*)al_entry != del_al_start) {
8657 (ATTR_LIST_ENTRY*)del_al_start, al_entry);