Lines Matching refs:jhdr_size
180 if (tr->blhdr && (tr->blhdr->max_blocks <= 0 || tr->blhdr->max_blocks > (tr->jnl->jhdr->size/tr->jnl->jhdr->jhdr_size))) {\
283 *offset = jnl->jhdr->jhdr_size;
312 buf_setblkno(bp, (daddr64_t) ((jnl->jdev_offset + *offset) / (off_t)jnl->jhdr->jhdr_size));
313 buf_setlblkno(bp, (daddr64_t) ((jnl->jdev_offset + *offset) / (off_t)jnl->jhdr->jhdr_size));
336 *offset = jnl->jhdr->jhdr_size;
405 if (do_journal_io(jnl, &jhdr_offset, jnl->header_buf, jnl->jhdr->jhdr_size, JNL_WRITE|JNL_HEADER) != (size_t)jnl->jhdr->jhdr_size) {
645 jnl->jhdr->jhdr_size = SWAP32(jnl->jhdr->jhdr_size);
841 offset = jnl->jhdr->jhdr_size + (offset - jnl->jhdr->size);
859 size_t jhdr_size = jnl->jhdr->jhdr_size, new_offset;
862 block_start = block_num*jhdr_size;
868 off_t prev_block_start = (*buf_ptr)[blk_index-1].block_num*jhdr_size;
872 if (overlap % jhdr_size != 0) {
873 panic("jnl: do_overlap: overlap with previous entry not a multiple of %lu\n", jhdr_size);
878 off_t new_num = block_end / jhdr_size;
896 if (!overwrite && block_end <= (*buf_ptr)[blk_index].block_num*jhdr_size) {
898 } else if (overwrite && (blk_index + 1 >= *num_full_ptr || block_end <= (*buf_ptr)[blk_index+1].block_num*jhdr_size)) {
910 while(index < *num_full_ptr && block_end > (*buf_ptr)[index].block_num*jhdr_size) {
911 if (block_end >= ((*buf_ptr)[index].block_num*jhdr_size + (*buf_ptr)[index].block_size)) {
915 overlap = block_end - (*buf_ptr)[index].block_num*jhdr_size;
917 if (overlap % jhdr_size != 0) {
918 panic("jnl: do_overlap: overlap of %lld is not multiple of %lu\n", overlap, jhdr_size);
922 (*buf_ptr)[index].block_num += (overlap / jhdr_size); // make sure overlap is multiple of jhdr_size, or round up
927 new_offset = jhdr_size + (new_offset - jnl->jhdr->size);
1016 jnl->jhdr->start = jnl->jhdr->jhdr_size;
1019 jnl->jhdr->end = jnl->jhdr->jhdr_size;
1239 offset = jnl->jhdr->jhdr_size + (offset - jnl->jhdr->size);
1266 jnl->jhdr->start = (jnl->jhdr->start % jnl->jhdr->size) + jnl->jhdr->jhdr_size;
1376 // and jnl->jhdr->jhdr_size are already valid.
1407 if ((tbuffer_size % jnl->jhdr->jhdr_size) != 0) {
1408 tbuffer_size -= (tbuffer_size % jnl->jhdr->jhdr_size);
1422 jnl->jhdr->blhdr_size = (jnl->tbuffer_size / jnl->jhdr->jhdr_size) * sizeof(block_info);
1569 jnl->jhdr->jhdr_size = phys_blksz;
1663 jnl->jhdr->jhdr_size = phys_blksz;
1706 if (phys_blksz != (size_t)jnl->jhdr->jhdr_size && jnl->jhdr->jhdr_size != 0) {
1718 jdev_name, jnl->jhdr->jhdr_size, phys_blksz);
1719 jnl->jhdr->jhdr_size = phys_blksz;
1726 jdev_name, phys_blksz, jnl->jhdr->jhdr_size);
1757 // XXXdbg if ((jnl->jhdr->start % jnl->jhdr->jhdr_size) != 0) {
1764 //XXXdbg if ((jnl->jhdr->end % jnl->jhdr->jhdr_size) != 0) {
1767 jdev_name, jnl->jhdr->end, jnl->jhdr->jhdr_size);
1784 if (orig_blksz < jnl->jhdr->jhdr_size) {
1785 printf("jnl: %s: open: jhdr_size is %d but orig phys blk size is %d. switching.\n",
1786 jdev_name, jnl->jhdr->jhdr_size, orig_blksz);
1788 jnl->jhdr->jhdr_size = orig_blksz;
1868 jnl.jhdr->jhdr_size = phys_blksz;
2004 kmem_free(kernel_map, (vm_offset_t)jnl->header_buf, jnl->jhdr->jhdr_size);
2026 printf(" jhdr size: %d\n", jnl->jhdr->jhdr_size);
2043 free_space_offset = jnl->jhdr->size - (jnl->jhdr->end - jnl->jhdr->start) - jnl->jhdr->jhdr_size;
2048 free_space_offset = jnl->jhdr->size - jnl->jhdr->jhdr_size;
2300 if ((buf_size(bp) % jnl->jhdr->jhdr_size) != 0) {
2302 buf_size(bp), jnl->jhdr->jhdr_size);
2307 if (tr->total_bytes+buf_size(bp) >= (jnl->jhdr->size - jnl->jhdr->jhdr_size)) {
2309 tr->total_bytes, (tr->jnl->jhdr->size - jnl->jhdr->jhdr_size), buf_size(bp), tr, bp);
3265 if ((offset % jnl->jhdr->jhdr_size) != 0) {
3267 jnl->jdev_name, offset, jnl->jhdr->jhdr_size);
3270 if ((journal_size % jnl->jhdr->jhdr_size) != 0) {
3272 jnl->jdev_name, journal_size, jnl->jhdr->jhdr_size);
3289 size_up_tbuffer(jnl, tbuffer_size, jnl->jhdr->jhdr_size);
3307 jnl->jhdr->start = jnl->jhdr->end = jnl->jhdr->jhdr_size;