Lines Matching refs:ctx

196 	ntfs_attr_search_ctx *ctx;   /* inode attribute being processed */
211 ntfs_attr_search_ctx *ctx; /* inode attribute being processed */
720 flags = resize->ctx->attr->flags;
721 atype = resize->ctx->attr->type;
723 if ((ret = ntfs_inode_badclus_bad(inode, resize->ctx->attr)) != 0) {
789 if (inode == FILE_Bitmap && resize->ctx->attr->type == AT_DATA)
814 (unsigned int)le32_to_cpu(resize->ctx->attr->type),
835 a = fsck->ctx->attr;
914 if (!(fsck->ctx = attr_get_search_ctx(fsck->ni, NULL)))
917 while (!ntfs_attrs_walk(fsck->ctx)) {
918 if (fsck->ctx->attr->type == AT_END)
923 ntfs_attr_put_search_ctx(fsck->ctx);
1110 if (!resize->ctx->attr->non_resident)
1114 resize->ctx->attr, NULL)))
1131 if (!(resize->ctx = attr_get_search_ctx(resize->ni, NULL)))
1134 while (!ntfs_attrs_walk(resize->ctx)) {
1135 if (resize->ctx->attr->type == AT_END)
1140 ntfs_attr_put_search_ctx(resize->ctx);
1554 a = resize->ctx->attr;
1565 lemref = resize->ctx->mrec->base_mft_record;
1614 ntfs_attr_search_ctx *ctx;
1618 ctx = resize->ctx;
1619 a = ctx->attr;
1650 le32_to_cpu(ctx->mrec->bytes_in_use));
1656 le32_to_cpu(ctx->mrec->bytes_in_use));
1658 le32_to_cpu(ctx->mrec->bytes_allocated));
1660 remains_size = le32_to_cpu(ctx->mrec->bytes_in_use);
1661 remains_size -= (next_attr - (char *)ctx->mrec);
1666 if (le32_to_cpu(ctx->mrec->bytes_in_use) + l >
1667 le32_to_cpu(ctx->mrec->bytes_allocated)) {
1675 ctx->mrec->bytes_in_use = cpu_to_le32(l +
1676 le32_to_cpu(ctx->mrec->bytes_in_use));
1931 if (r->mref == FILE_MFTMirr && r->ctx->attr->type == AT_DATA) {
2029 && (resize->ctx->attr->type == AT_DATA)
2043 (unsigned int)le32_to_cpu(resize->ctx->attr->type),
2057 || (resize->ctx->attr->type != AT_DATA)
2071 a = resize->ctx->attr;
2113 if (resize->ctx->attr->type != AT_DATA)
2128 ATTR_RECORD *attr = resize->ctx->attr;
2166 if (!(resize->ctx = attr_get_search_ctx(NULL, resize->mrec)))
2174 while (!ntfs_attrs_walk(resize->ctx)) {
2175 if (resize->ctx->attr->type == AT_END)
2181 ret = ntfs_inode_badclus_bad(resize->mref, resize->ctx->attr);
2188 resize->ctx->attr->type == AT_DATA)
2193 && (resize->ctx->attr->type == AT_DATA))
2199 ntfs_attr_put_search_ctx(resize->ctx);
2288 || !(resize->ctx = attr_get_search_ctx(NULL,
2292 while (!ntfs_attrs_walk(resize->ctx)
2293 && (resize->ctx->attr->type != AT_DATA)) { }
2294 if (resize->ctx->attr->type == AT_DATA) {
2297 high_le = resize->ctx->attr->highest_vcn;
2303 ntfs_attr_put_search_ctx(resize->ctx);
2390 static ntfs_attr *open_badclust_bad_attr(ntfs_attr_search_ctx *ctx)
2399 base_ni = ctx->base_ntfs_ino;
2401 base_ni = ctx->ntfs_ino;
2429 ntfs_attr_search_ctx *ctx;
2433 na = open_badclust_bad_attr(resize->ctx);
2446 ctx = resize->ctx;
2447 ctx->attr->data_size = cpu_to_sle64(na->data_size);
2448 ctx->attr->initialized_size = cpu_to_sle64(na->initialized_size);
2449 ctx->attr->flags = na->data_flags;
2450 ctx->attr->compression_unit = 0;
2451 ntfs_inode_mark_dirty(ctx->ntfs_ino);
2471 ATTR_RECORD *a = resize->ctx->attr;
2513 a = resize->ctx->attr;
2575 ntfs_attr_search_ctx **ctx)
2584 if (!(*ctx = attr_get_search_ctx(ni, NULL)))
2593 0, NULL, 0, *ctx))
2599 static void close_inode_and_context(ntfs_attr_search_ctx *ctx)
2603 ni = ctx->base_ntfs_ino;
2605 ni = ctx->ntfs_ino;
2606 ntfs_attr_put_search_ctx(ctx);
2613 ntfs_attr_search_ctx *ctx;
2620 lookup_data_attr(vol, FILE_BadClus, "$Bad", &ctx);
2622 na = open_badclust_bad_attr(ctx);
2655 close_inode_and_context(ctx);
2657 ntfs_attr_put_search_ctx(ctx);
2672 lookup_data_attr(resize->vol, FILE_BadClus, "$Bad", &resize->ctx);
2673 /* FIXME: sanity_check_attr(ctx->attr); */
2677 close_inode_and_context(resize->ctx);
2691 lookup_data_attr(resize->vol, FILE_Bitmap, NULL, &resize->ctx);
2703 vol->mft_record_size, resize->ctx->mrec) != 1))
2706 if (write_mft_record(vol, resize->ctx->ntfs_ino->mft_no,
2707 resize->ctx->mrec))
2712 memcpy(vol->lcnbmp_ni->mrec,resize->ctx->mrec,vol->mft_record_size);
2718 close_inode_and_context(resize->ctx);
2720 ntfs_attr_put_search_ctx(resize->ctx);
3905 ntfs_attr_search_ctx ctx;
3966 resize.ctx = &ctx;
3967 ctx.attr = a;
3968 ctx.mrec = mrec;