Lines Matching refs:mrec

410 	if (!ni || !ni->vol || !ni->mrec) {
983 (char*)ctx->mrec + vol->mft_record_size) {
1892 (char*)ctx->mrec + vol->mft_record_size) {
1899 ctx->mrec)) {
1974 ctx->mrec)) {
1982 ctx->mrec);
1987 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
2276 ctx->mrec);
2451 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
2648 * mft record specified by @ctx->mrec, beginning at @ctx->attr, for an
2668 * mft record @ctx->mrec.
2681 * @ctx->mrec belongs. This is so we can get at the ntfs volume and hence at
2741 if (p2n(a) < p2n(ctx->mrec) || (char*)a > (char*)ctx->mrec +
2742 le32_to_cpu(ctx->mrec->bytes_allocated))
2901 * @ctx->mrec, and @ctx->al_entry is the attribute list entry for this
2943 ctx->base_mrec = ctx->mrec;
2997 ctx->mrec = ctx->base_mrec;
3000 ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
3001 le16_to_cpu(ctx->mrec->attrs_offset));
3108 ni->mrec->sequence_number)) {
3118 ctx->mrec = ctx->base_mrec;
3126 ctx->mrec = ni->mrec;
3129 a = ctx->attr = (ATTR_RECORD*)((char*)ctx->mrec +
3130 le16_to_cpu(ctx->mrec->attrs_offset));
3132 * ctx->ntfs_ino, ctx->mrec, and ctx->attr now point to the
3149 if ((char*)a < (char*)ctx->mrec || (char*)a > (char*)ctx->mrec +
3150 le32_to_cpu(ctx->mrec->bytes_allocated))
3190 ctx->mrec = ctx->base_mrec;
3209 * @ctx->mrec and @ctx->attr indicate the position at which the
3220 ctx->mrec = ctx->base_mrec;
3221 ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
3222 le16_to_cpu(ctx->mrec->attrs_offset));
3290 * @ctx->mrec, and @ctx->al_entry is the attribute list entry for this
3324 if (!ctx || !ctx->mrec || !ctx->attr || (name && name != AT_UNNAMED &&
3380 * @mrec: mft record with which to initialize the search context
3382 * Initialize the attribute search context @ctx with @ni and @mrec.
3385 ntfs_inode *ni, MFT_RECORD *mrec)
3387 if (!mrec)
3388 mrec = ni->mrec;
3389 ctx->mrec = mrec;
3391 ctx->attr = (ATTR_RECORD*)((u8*)mrec + le16_to_cpu(mrec->attrs_offset));
3415 ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
3416 le16_to_cpu(ctx->mrec->attrs_offset));
3431 * @mrec: mft record with which to initialize the search context
3433 * Allocate a new attribute search context, initialize it with @ni and @mrec,
3436 * @mrec can be NULL, in which case the mft record is taken from @ni.
3439 * be NULL and @mrec to be set. Do NOT do this unless you understand the
3442 ntfs_attr_search_ctx *ntfs_attr_get_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec)
3446 if (!ni && !mrec) {
3453 ntfs_attr_init_search_ctx(ctx, ni, mrec);
3767 * attribute in @ni->mrec, not any extent inode in case if @ni is base
3781 m = ctx->mrec;
3787 if (ntfs_make_room_for_attr(ctx->mrec, (u8*) ctx->attr, length)) {
3832 if (ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
3901 * attribute in @ni->mrec, not any extent inode in case if @ni is base
3916 m = ctx->mrec;
3924 if (ntfs_make_room_for_attr(ctx->mrec, (u8*) ctx->attr, length)) {
3984 offset = (u8*)ctx->attr - (u8*)ctx->mrec;
4010 if (!ctx || !ctx->ntfs_ino || !ctx->mrec || !ctx->attr) {
4026 if (ntfs_attr_record_resize(ctx->mrec, ctx->attr, 0)) {
4060 if (le32_to_cpu(ctx->mrec->bytes_in_use) -
4061 le16_to_cpu(ctx->mrec->attrs_offset) == 8) {
4229 if (le32_to_cpu(ni->mrec->bytes_allocated) -
4230 le32_to_cpu(ni->mrec->bytes_in_use) >= attr_rec_size) {
4243 if (le32_to_cpu(attr_ni->mrec->bytes_allocated) -
4244 le32_to_cpu(attr_ni->mrec->bytes_in_use) >=
4327 if (ntfs_attr_record_resize(attr_ni->mrec,
4328 (ATTR_RECORD*)((u8*)attr_ni->mrec + offset), 0))
4332 if (le32_to_cpu(attr_ni->mrec->bytes_in_use) -
4333 le16_to_cpu(attr_ni->mrec->attrs_offset) == 8)
4577 * attribute in @ni->mrec, not any extent inode in case if @ni is base
4595 if (ntfs_make_room_for_attr(ni->mrec, (u8*) nctx->attr,
4602 nctx->attr->instance = nctx->mrec->next_attr_instance;
4603 nctx->mrec->next_attr_instance = cpu_to_le16(
4604 (le16_to_cpu(nctx->mrec->next_attr_instance) + 1) & 0xffff);
4605 ntfs_attr_record_resize(ctx->mrec, a, 0);
4611 MK_LE_MREF(ni->mft_no, le16_to_cpu(ni->mrec->sequence_number));
4674 m = ni->mrec;
4828 if (ntfs_attr_record_resize(ctx->mrec, a, arec_size) < 0) {
4964 if (!(ret = ntfs_resident_attr_value_resize(ctx->mrec, ctx->attr,
4972 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
5026 ntfs_attr_init_search_ctx(ctx, NULL, na->ni->mrec);
5115 if (le32_to_cpu(ctx->mrec->bytes_in_use) ==
5116 le16_to_cpu(ctx->mrec->attrs_offset) +
5276 if (le32_to_cpu(ctx->mrec->bytes_in_use) - le32_to_cpu(a->length) +
5277 arec_size > le32_to_cpu(ctx->mrec->bytes_allocated)) {
5295 if (ntfs_attr_record_resize(ctx->mrec, a, arec_size) < 0) {
5617 m = ctx->mrec;
5840 m = ni->mrec;
6052 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY) {
6274 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY) {