Lines Matching defs:btp
58 struct xfs_buftarg *btp;
61 btp = kzalloc(struct_size(btp, bt_cache, 1), GFP_KERNEL);
62 if (!btp)
84 error = xfs_buf_cache_init(btp->bt_cache);
89 btp->bt_mount = mp;
90 btp->bt_dev = (dev_t)-1U;
91 btp->bt_bdev = NULL; /* in-memory buftargs have no bdev */
92 btp->bt_file = file;
93 btp->bt_meta_sectorsize = XMBUF_BLOCKSIZE;
94 btp->bt_meta_sectormask = XMBUF_BLOCKSIZE - 1;
96 error = xfs_init_buftarg(btp, XMBUF_BLOCKSIZE, descr);
100 trace_xmbuf_create(btp);
102 *btpp = btp;
106 xfs_buf_cache_destroy(btp->bt_cache);
110 kfree(btp);
117 struct xfs_buftarg *btp)
119 ASSERT(xfs_buftarg_is_mem(btp));
120 ASSERT(percpu_counter_sum(&btp->bt_io_count) == 0);
122 trace_xmbuf_free(btp);
124 xfs_destroy_buftarg(btp);
125 xfs_buf_cache_destroy(btp->bt_cache);
126 fput(btp->bt_file);
127 kfree(btp);
198 struct xfs_buftarg *btp,
201 struct inode *inode = file_inode(btp->bt_file);
203 ASSERT(xfs_buftarg_is_mem(btp));