• Home
  • Raw
  • Download

Lines Matching refs:context

57 	int (*get_clusters)(struct ocfs2_cow_context *context,
3114 struct ocfs2_cow_context *context, in ocfs2_replace_clusters() argument
3120 struct ocfs2_caching_info *ci = context->data_et.et_ci; in ocfs2_replace_clusters()
3128 ret = context->cow_duplicate_clusters(handle, context->inode, in ocfs2_replace_clusters()
3136 ret = ocfs2_clear_ext_refcount(handle, &context->data_et, in ocfs2_replace_clusters()
3138 context->meta_ac, &context->dealloc); in ocfs2_replace_clusters()
3195 static int ocfs2_di_get_clusters(struct ocfs2_cow_context *context, in ocfs2_di_get_clusters() argument
3200 return ocfs2_get_clusters(context->inode, v_cluster, p_cluster, in ocfs2_di_get_clusters()
3205 struct ocfs2_cow_context *context, in ocfs2_make_clusters_writable() argument
3215 struct ocfs2_caching_info *ref_ci = &context->ref_tree->rf_ci; in ocfs2_make_clusters_writable()
3222 &context->data_et, in ocfs2_make_clusters_writable()
3224 context->ref_root_bh, in ocfs2_make_clusters_writable()
3225 &context->meta_ac, in ocfs2_make_clusters_writable()
3226 &context->data_ac, &credits); in ocfs2_make_clusters_writable()
3232 if (context->post_refcount) in ocfs2_make_clusters_writable()
3233 credits += context->post_refcount->credits; in ocfs2_make_clusters_writable()
3235 credits += context->extra_credits; in ocfs2_make_clusters_writable()
3246 ret = ocfs2_get_refcount_rec(ref_ci, context->ref_root_bh, in ocfs2_make_clusters_writable()
3269 &context->data_et, in ocfs2_make_clusters_writable()
3272 context->meta_ac, in ocfs2_make_clusters_writable()
3273 &context->dealloc); in ocfs2_make_clusters_writable()
3282 context->data_ac, in ocfs2_make_clusters_writable()
3290 ret = ocfs2_replace_clusters(handle, context, in ocfs2_make_clusters_writable()
3301 context->ref_root_bh, in ocfs2_make_clusters_writable()
3303 context->meta_ac, in ocfs2_make_clusters_writable()
3304 &context->dealloc, delete); in ocfs2_make_clusters_writable()
3318 if (context->post_refcount && context->post_refcount->func) { in ocfs2_make_clusters_writable()
3319 ret = context->post_refcount->func(context->inode, handle, in ocfs2_make_clusters_writable()
3320 context->post_refcount->para); in ocfs2_make_clusters_writable()
3331 if (context->get_clusters == ocfs2_di_get_clusters) { in ocfs2_make_clusters_writable()
3332 ret = ocfs2_cow_sync_writeback(sb, context->inode, cpos, in ocfs2_make_clusters_writable()
3342 if (context->data_ac) { in ocfs2_make_clusters_writable()
3343 ocfs2_free_alloc_context(context->data_ac); in ocfs2_make_clusters_writable()
3344 context->data_ac = NULL; in ocfs2_make_clusters_writable()
3346 if (context->meta_ac) { in ocfs2_make_clusters_writable()
3347 ocfs2_free_alloc_context(context->meta_ac); in ocfs2_make_clusters_writable()
3348 context->meta_ac = NULL; in ocfs2_make_clusters_writable()
3355 static int ocfs2_replace_cow(struct ocfs2_cow_context *context) in ocfs2_replace_cow() argument
3358 struct inode *inode = context->inode; in ocfs2_replace_cow()
3359 u32 cow_start = context->cow_start, cow_len = context->cow_len; in ocfs2_replace_cow()
3369 ocfs2_init_dealloc_ctxt(&context->dealloc); in ocfs2_replace_cow()
3372 ret = context->get_clusters(context, cow_start, &p_cluster, in ocfs2_replace_cow()
3384 ret = ocfs2_make_clusters_writable(inode->i_sb, context, in ocfs2_replace_cow()
3396 if (ocfs2_dealloc_has_cluster(&context->dealloc)) { in ocfs2_replace_cow()
3398 ocfs2_run_deallocs(osb, &context->dealloc); in ocfs2_replace_cow()
3419 struct ocfs2_cow_context *context = NULL; in ocfs2_refcount_cow_hunk() local
3437 context = kzalloc(sizeof(struct ocfs2_cow_context), GFP_NOFS); in ocfs2_refcount_cow_hunk()
3438 if (!context) { in ocfs2_refcount_cow_hunk()
3451 context->inode = inode; in ocfs2_refcount_cow_hunk()
3452 context->cow_start = cow_start; in ocfs2_refcount_cow_hunk()
3453 context->cow_len = cow_len; in ocfs2_refcount_cow_hunk()
3454 context->ref_tree = ref_tree; in ocfs2_refcount_cow_hunk()
3455 context->ref_root_bh = ref_root_bh; in ocfs2_refcount_cow_hunk()
3456 context->cow_duplicate_clusters = ocfs2_duplicate_clusters_by_page; in ocfs2_refcount_cow_hunk()
3457 context->get_clusters = ocfs2_di_get_clusters; in ocfs2_refcount_cow_hunk()
3459 ocfs2_init_dinode_extent_tree(&context->data_et, in ocfs2_refcount_cow_hunk()
3462 ret = ocfs2_replace_cow(context); in ocfs2_refcount_cow_hunk()
3476 kfree(context); in ocfs2_refcount_cow_hunk()
3520 static int ocfs2_xattr_value_get_clusters(struct ocfs2_cow_context *context, in ocfs2_xattr_value_get_clusters() argument
3525 struct inode *inode = context->inode; in ocfs2_xattr_value_get_clusters()
3526 struct ocfs2_xattr_value_root *xv = context->cow_object; in ocfs2_xattr_value_get_clusters()
3631 struct ocfs2_cow_context *context = NULL; in ocfs2_refcount_cow_xattr() local
3646 context = kzalloc(sizeof(struct ocfs2_cow_context), GFP_NOFS); in ocfs2_refcount_cow_xattr()
3647 if (!context) { in ocfs2_refcount_cow_xattr()
3653 context->inode = inode; in ocfs2_refcount_cow_xattr()
3654 context->cow_start = cow_start; in ocfs2_refcount_cow_xattr()
3655 context->cow_len = cow_len; in ocfs2_refcount_cow_xattr()
3656 context->ref_tree = ref_tree; in ocfs2_refcount_cow_xattr()
3657 context->ref_root_bh = ref_root_bh; in ocfs2_refcount_cow_xattr()
3658 context->cow_object = xv; in ocfs2_refcount_cow_xattr()
3660 context->cow_duplicate_clusters = ocfs2_duplicate_clusters_by_jbd; in ocfs2_refcount_cow_xattr()
3662 context->extra_credits = in ocfs2_refcount_cow_xattr()
3664 context->get_clusters = ocfs2_xattr_value_get_clusters; in ocfs2_refcount_cow_xattr()
3665 context->post_refcount = post; in ocfs2_refcount_cow_xattr()
3667 ocfs2_init_xattr_value_extent_tree(&context->data_et, in ocfs2_refcount_cow_xattr()
3670 ret = ocfs2_replace_cow(context); in ocfs2_refcount_cow_xattr()
3675 kfree(context); in ocfs2_refcount_cow_xattr()