Lines Matching defs:mrec
422 if (!ni || !ni->vol || !ni->mrec) {
1060 (char*)ctx->mrec + vol->mft_record_size) {
1977 (char*)ctx->mrec + vol->mft_record_size) {
1984 ctx->mrec)) {
2069 ctx->mrec)) {
2077 ctx->mrec);
2082 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
2364 ctx->mrec);
2571 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
2768 * mft record specified by @ctx->mrec, beginning at @ctx->attr, for an
2788 * mft record @ctx->mrec.
2801 * @ctx->mrec belongs. This is so we can get at the ntfs volume and hence at
2867 offs = p2n(a) - p2n(ctx->mrec);
2868 space = le32_to_cpu(ctx->mrec->bytes_in_use) - offs;
3042 * @ctx->mrec, and @ctx->al_entry is the attribute list entry for this
3086 ctx->base_mrec = ctx->mrec;
3154 ctx->mrec = ctx->base_mrec;
3157 ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
3158 le16_to_cpu(ctx->mrec->attrs_offset));
3272 ni->mrec->sequence_number)) {
3282 ctx->mrec = ctx->base_mrec;
3296 ctx->mrec = ni->mrec;
3299 a = ctx->attr = (ATTR_RECORD*)((char*)ctx->mrec +
3300 le16_to_cpu(ctx->mrec->attrs_offset));
3302 * ctx->ntfs_ino, ctx->mrec, and ctx->attr now point to the
3323 offs = p2n(a) - p2n(ctx->mrec);
3324 space = le32_to_cpu(ctx->mrec->bytes_in_use) - offs;
3367 ctx->mrec = ctx->base_mrec;
3387 * @ctx->mrec and @ctx->attr indicate the position at which the
3398 ctx->mrec = ctx->base_mrec;
3399 ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
3400 le16_to_cpu(ctx->mrec->attrs_offset));
3652 * @ctx->mrec, and @ctx->al_entry is the attribute list entry for this
3686 if (!ctx || !ctx->mrec || !ctx->attr || (name && name != AT_UNNAMED &&
3742 * @mrec: mft record with which to initialize the search context
3744 * Initialize the attribute search context @ctx with @ni and @mrec.
3747 ntfs_inode *ni, MFT_RECORD *mrec)
3749 if (!mrec)
3750 mrec = ni->mrec;
3751 ctx->mrec = mrec;
3753 ctx->attr = (ATTR_RECORD*)((u8*)mrec + le16_to_cpu(mrec->attrs_offset));
3777 ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
3778 le16_to_cpu(ctx->mrec->attrs_offset));
3793 * @mrec: mft record with which to initialize the search context
3795 * Allocate a new attribute search context, initialize it with @ni and @mrec,
3798 * @mrec can be NULL, in which case the mft record is taken from @ni.
3801 * be NULL and @mrec to be set. Do NOT do this unless you understand the
3804 ntfs_attr_search_ctx *ntfs_attr_get_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec)
3808 if (!ni && !mrec) {
3815 ntfs_attr_init_search_ctx(ctx, ni, mrec);
4130 * attribute in @ni->mrec, not any extent inode in case if @ni is base
4144 m = ctx->mrec;
4150 if (ntfs_make_room_for_attr(ctx->mrec, (u8*) ctx->attr, length)) {
4195 if (ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
4264 * attribute in @ni->mrec, not any extent inode in case if @ni is base
4279 m = ctx->mrec;
4287 if (ntfs_make_room_for_attr(ctx->mrec, (u8*) ctx->attr, length)) {
4347 offset = (u8*)ctx->attr - (u8*)ctx->mrec;
4373 if (!ctx || !ctx->ntfs_ino || !ctx->mrec || !ctx->attr) {
4389 if (ntfs_attr_record_resize(ctx->mrec, ctx->attr, 0)) {
4423 if (le32_to_cpu(ctx->mrec->bytes_in_use) -
4424 le16_to_cpu(ctx->mrec->attrs_offset) == 8) {
4592 if (le32_to_cpu(ni->mrec->bytes_allocated) -
4593 le32_to_cpu(ni->mrec->bytes_in_use) >= attr_rec_size) {
4606 if (le32_to_cpu(attr_ni->mrec->bytes_allocated) -
4607 le32_to_cpu(attr_ni->mrec->bytes_in_use) >=
4690 if (ntfs_attr_record_resize(attr_ni->mrec,
4691 (ATTR_RECORD*)((u8*)attr_ni->mrec + offset), 0))
4695 if (le32_to_cpu(attr_ni->mrec->bytes_in_use) -
4696 le16_to_cpu(attr_ni->mrec->attrs_offset) == 8)
4954 * attribute in @ni->mrec, not any extent inode in case if @ni is base
4972 if (ntfs_make_room_for_attr(ni->mrec, (u8*) nctx->attr,
4979 nctx->attr->instance = nctx->mrec->next_attr_instance;
4980 nctx->mrec->next_attr_instance = cpu_to_le16(
4981 (le16_to_cpu(nctx->mrec->next_attr_instance) + 1) & 0xffff);
4982 ntfs_attr_record_resize(ctx->mrec, a, 0);
4988 MK_LE_MREF(ni->mft_no, le16_to_cpu(ni->mrec->sequence_number));
5051 m = ni->mrec;
5205 if (ntfs_attr_record_resize(ctx->mrec, a, arec_size) < 0) {
5341 if (!(ret = ntfs_resident_attr_value_resize(ctx->mrec, ctx->attr,
5349 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY
5403 ntfs_attr_init_search_ctx(ctx, NULL, na->ni->mrec);
5496 if (le32_to_cpu(ctx->mrec->bytes_in_use) ==
5497 le16_to_cpu(ctx->mrec->attrs_offset) +
5657 if (le32_to_cpu(ctx->mrec->bytes_in_use) - le32_to_cpu(a->length) +
5658 arec_size > le32_to_cpu(ctx->mrec->bytes_allocated)) {
5676 if (ntfs_attr_record_resize(ctx->mrec, a, arec_size) < 0) {
6006 m = ctx->mrec;
6236 m = ni->mrec;
6450 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY) {
6682 if (na->ni->mrec->flags & MFT_RECORD_IS_DIRECTORY) {