| /linux/fs/xfs/ |
| H A D | xfs_buf_item.c | 37 struct xfs_buf_log_item *bip, in xfs_buf_item_get_format() argument 40 ASSERT(bip->bli_formats == NULL); in xfs_buf_item_get_format() 41 bip->bli_format_count = count; in xfs_buf_item_get_format() 44 bip->bli_formats = &bip->__bli_format; in xfs_buf_item_get_format() 48 bip->bli_formats = kzalloc(count * sizeof(struct xfs_buf_log_format), in xfs_buf_item_get_format() 54 struct xfs_buf_log_item *bip) in xfs_buf_item_free_format() argument 56 if (bip->bli_formats != &bip->__bli_format) { in xfs_buf_item_free_format() 57 kfree(bip->bli_formats); in xfs_buf_item_free_format() 58 bip->bli_formats = NULL; in xfs_buf_item_free_format() 64 struct xfs_buf_log_item *bip) in xfs_buf_item_free() argument [all …]
|
| H A D | xfs_buf_item.h | 52 void xfs_buf_item_put(struct xfs_buf_log_item *bip);
|
| H A D | xfs_buf_item_recover.c | 449 struct xfs_buf_log_item *bip; in xlog_recover_validate_buf_type() local 453 bip = bp->b_log_item; in xlog_recover_validate_buf_type() 454 bip->bli_item.li_lsn = current_lsn; in xlog_recover_validate_buf_type()
|
| /linux/block/ |
| H A D | bio-integrity.c | 13 struct bio_integrity_payload bip; member 22 struct bio_integrity_payload *bip = bio_integrity(bio); in bio_integrity_alloc_buf() local 35 bvec_set_page(&bip->bip_vec[0], page, len, 0); in bio_integrity_alloc_buf() 36 bip->bip_flags |= BIP_MEMPOOL; in bio_integrity_alloc_buf() 38 bvec_set_page(&bip->bip_vec[0], virt_to_page(buf), len, in bio_integrity_alloc_buf() 42 bip->bip_vcnt = 1; in bio_integrity_alloc_buf() 43 bip->bip_iter.bi_size = len; in bio_integrity_alloc_buf() 46 void bio_integrity_free_buf(struct bio_integrity_payload *bip) in bio_integrity_free_buf() argument 48 struct bio_vec *bv = &bip->bip_vec[0]; in bio_integrity_free_buf() 50 if (bip->bip_flags & BIP_MEMPOOL) in bio_integrity_free_buf() [all …]
|
| H A D | bio-integrity-auto.c | 20 struct bio_integrity_payload bip; member 32 bio_integrity_free_buf(&bid->bip); in bio_integrity_finish() 48 static bool bip_should_check(struct bio_integrity_payload *bip) in bip_should_check() argument 50 return bip->bip_flags & BIP_CHECK_FLAGS; in bip_should_check() 69 struct bio_integrity_payload *bip = bio_integrity(bio); in __bio_integrity_endio() local 71 container_of(bip, struct bio_integrity_data, bip); in __bio_integrity_endio() 74 bip_should_check(bip)) { in __bio_integrity_endio() 142 bio_integrity_init(bio, &bid->bip, &bid->bvec, 1); in bio_integrity_prep() 144 bid->bip.bip_flags |= BIP_BLOCK_INTEGRITY; in bio_integrity_prep() 147 bip_set_seed(&bid->bip, bio->bi_iter.bi_sector); in bio_integrity_prep() [all …]
|
| H A D | t10-pi.c | 134 struct bio_integrity_payload *bip = bio_integrity(bio); in t10_pi_type1_prepare() local 135 u32 virt = bip_get_seed(bip) & 0xffffffff; in t10_pi_type1_prepare() 140 if (bip->bip_flags & BIP_MAPPED_INTEGRITY) in t10_pi_type1_prepare() 143 bip_for_each_vec(iv, bip, iter) { in t10_pi_type1_prepare() 160 bip->bip_flags |= BIP_MAPPED_INTEGRITY; in t10_pi_type1_prepare() 186 struct bio_integrity_payload *bip = bio_integrity(bio); in t10_pi_type1_complete() local 187 u32 virt = bip_get_seed(bip) & 0xffffffff; in t10_pi_type1_complete() 191 bip_for_each_vec(iv, bip, iter) { in t10_pi_type1_complete() 308 struct bio_integrity_payload *bip = bio_integrity(bio); in ext_pi_type1_prepare() local 309 u64 virt = lower_48_bits(bip_get_seed(bip)); in ext_pi_type1_prepare() [all …]
|
| H A D | blk-integrity.c | 143 struct bio_integrity_payload *bip, *bip_next; in blk_integrity_merge_rq() local 151 bip = bio_integrity(req->bio); in blk_integrity_merge_rq() 153 if (bip->bip_flags != bip_next->bip_flags) in blk_integrity_merge_rq() 156 if (bip->bip_flags & BIP_CHECK_APPTAG && in blk_integrity_merge_rq() 157 bip->app_tag != bip_next->app_tag) in blk_integrity_merge_rq() 173 struct bio_integrity_payload *bip, *bip_bio = bio_integrity(bio); in blk_integrity_merge_bio() local 182 bip = bio_integrity(req->bio); in blk_integrity_merge_bio() 183 if (bip->bip_flags != bip_bio->bip_flags) in blk_integrity_merge_bio() 186 if (bip->bip_flags & BIP_CHECK_APPTAG && in blk_integrity_merge_bio() 187 bip->app_tag != bip_bio->app_tag) in blk_integrity_merge_bio()
|
| /linux/Documentation/translations/zh_CN/block/ |
| H A D | data-integrity.rst | 102 一个新字段。调用 bio_integrity(bio) 会返回一个指向 struct bip 的指针,该 103 结构体包含了该 bio 的完整性负载。本质上,bip 是一个精简版的 struct bio,其 108 性保护。该函数会分配并附加一个 bip 到该 bio 上。 112 调用 bio_free() 会自动释放bip。 167 `struct bip * bio_integrity_alloc(bio, gfp_mask, nr_pages);` 177 将包含完整性元数据的一页附加到已有的 bio 上。该 bio 必须已有 bip, 181 中可能会被修改!完整性元数据中的第一个引用标签必须等于 bip->bip_sector。 183 只要 bip bio_vec array(nr_pages)有空间,就可以继续通过
|
| /linux/drivers/md/ |
| H A D | dm-io-rewind.c | 58 struct bio_integrity_payload *bip = bio_integrity(bio); in dm_bio_integrity_rewind() local 62 bip->bip_iter.bi_sector -= bio_integrity_intervals(bi, bytes_done >> 9); in dm_bio_integrity_rewind() 63 dm_bvec_iter_rewind(bip->bip_vec, &bip->bip_iter, bytes); in dm_bio_integrity_rewind()
|
| H A D | dm-integrity.c | 1986 struct bio_integrity_payload *bip = dio->bio_details.bi_integrity; in integrity_metadata() local 1988 if (bip) { in integrity_metadata() 1996 bip_for_each_vec(biv, bip, iter) { in integrity_metadata() 2054 struct bio_integrity_payload *bip; in dm_integrity_map() local 2103 bip = bio_integrity(bio); in dm_integrity_map() 2105 if (bip) { in dm_integrity_map() 2112 if (unlikely(wanted_tag_size != bip->bip_iter.bi_size)) { in dm_integrity_map() 2114 bip->bip_iter.bi_size, wanted_tag_size); in dm_integrity_map() 2119 if (unlikely(bip != NULL)) { in dm_integrity_map() 2187 struct bio_integrity_payload *bip = bio_integrity(bio); in __journal_read_write() local [all …]
|
| H A D | raid5.c | 3437 struct bio **bip; in stripe_bio_overlaps() local 3447 bip = &sh->dev[dd_idx].towrite; in stripe_bio_overlaps() 3449 bip = &sh->dev[dd_idx].toread; in stripe_bio_overlaps() 3451 while (*bip && (*bip)->bi_iter.bi_sector < bi->bi_iter.bi_sector) { in stripe_bio_overlaps() 3452 if (bio_end_sector(*bip) > bi->bi_iter.bi_sector) in stripe_bio_overlaps() 3454 bip = &(*bip)->bi_next; in stripe_bio_overlaps() 3457 if (*bip && (*bip)->bi_iter.bi_sector < bio_end_sector(bi)) in stripe_bio_overlaps() 3497 struct bio **bip; in __add_stripe_bio() local 3501 bip = &sh->dev[dd_idx].towrite; in __add_stripe_bio() 3502 if (!*bip) in __add_stripe_bio() [all …]
|
| H A D | dm-crypt.c | 1138 struct bio_integrity_payload *bip; in dm_crypt_integrity_io_alloc() local 1145 bip = bio_integrity_alloc(bio, GFP_NOIO, 1); in dm_crypt_integrity_io_alloc() 1146 if (IS_ERR(bip)) in dm_crypt_integrity_io_alloc() 1147 return PTR_ERR(bip); in dm_crypt_integrity_io_alloc() 1151 bip->bip_iter.bi_sector = bio->bi_iter.bi_sector; in dm_crypt_integrity_io_alloc()
|
| /linux/drivers/nvdimm/ |
| H A D | btt.c | 1135 static int btt_rw_integrity(struct btt *btt, struct bio_integrity_payload *bip, in btt_rw_integrity() argument 1142 if (bip == NULL) in btt_rw_integrity() 1152 bv = bvec_iter_bvec(bip->bip_vec, bip->bip_iter); in btt_rw_integrity() 1174 if (!bvec_iter_advance(bip->bip_vec, &bip->bip_iter, cur_len)) in btt_rw_integrity() 1182 static int btt_rw_integrity(struct btt *btt, struct bio_integrity_payload *bip, in btt_rw_integrity() argument 1189 static int btt_read_pg(struct btt *btt, struct bio_integrity_payload *bip, in btt_read_pg() argument 1264 if (bip) { in btt_read_pg() 1265 ret = btt_rw_integrity(btt, bip, arena, postmap, READ); in btt_read_pg() 1302 static int btt_write_pg(struct btt *btt, struct bio_integrity_payload *bip, in btt_write_pg() argument 1361 if (bip) { in btt_write_pg() [all …]
|
| /linux/Documentation/block/ |
| H A D | data-integrity.rst | 138 pointer to a struct bip which contains the bio integrity payload. 139 Essentially a bip is a trimmed down struct bio which holds a bio_vec 145 bip to the bio. 150 bio_free() will automatically free the bip. 216 `struct bip * bio_integrity_alloc(bio, gfp_mask, nr_pages);` 228 bio. The bio must have an existing bip, 235 integrity metadata must have a value of bip->bip_sector. 238 there is room in the bip bio_vec array (nr_pages).
|
| /linux/drivers/target/ |
| H A D | target_core_iblock.c | 693 struct bio_integrity_payload *bip; in iblock_alloc_bip() local 704 bip = bio_integrity_alloc(bio, GFP_NOIO, bio_max_segs(cmd->t_prot_nents)); in iblock_alloc_bip() 705 if (IS_ERR(bip)) { in iblock_alloc_bip() 707 return PTR_ERR(bip); in iblock_alloc_bip() 711 bip_set_seed(bip, bio->bi_iter.bi_sector >> in iblock_alloc_bip() 714 pr_debug("IBLOCK BIP Size: %u Sector: %llu\n", bip->bip_iter.bi_size, in iblock_alloc_bip() 715 (unsigned long long)bip->bip_iter.bi_sector); in iblock_alloc_bip()
|
| /linux/Documentation/filesystems/xfs/ |
| H A D | xfs-self-describing-metadata.rst | 305 struct xfs_buf_log_item *bip = bp->b_fspriv; 317 if (bip) { 319 hdr->lsn = cpu_to_be64(bip->bli_item.li_lsn);
|
| /linux/fs/xfs/libxfs/ |
| H A D | xfs_sb.c | 1160 struct xfs_buf_log_item *bip = bp->b_log_item; in xfs_sb_write_verify() local 1179 if (bip) in xfs_sb_write_verify() 1180 dsb->sb_lsn = cpu_to_be64(bip->bli_item.li_lsn); in xfs_sb_write_verify()
|
| H A D | xfs_ialloc.c | 2720 struct xfs_buf_log_item *bip = bp->b_log_item; in xfs_agi_write_verify() local 2733 if (bip) in xfs_agi_write_verify() 2734 agi->agi_lsn = cpu_to_be64(bip->bli_item.li_lsn); in xfs_agi_write_verify()
|