Lines Matching defs:nilfsdev
68 uint64_t nilfs_get_segnum_of_block(struct nilfs_device *nilfsdev,
71 return blocknr / nilfs_rw32(nilfsdev->super.s_blocks_per_segment);
76 nilfs_get_segment_range(struct nilfs_device *nilfsdev, uint64_t segnum,
81 blks_per_seg = nilfs_rw64(nilfsdev->super.s_blocks_per_segment);
85 *seg_start = nilfs_rw64(nilfsdev->super.s_first_data_block);
89 void nilfs_calc_mdt_consts(struct nilfs_device *nilfsdev,
92 uint32_t blocksize = nilfsdev->blocksize;
130 nilfs_dev_bread(struct nilfs_device *nilfsdev, uint64_t blocknr,
133 int blk2dev = nilfsdev->blocksize / DEV_BSIZE;
135 return bread(nilfsdev->devvp, blocknr * blk2dev, nilfsdev->blocksize,
145 struct nilfs_device *nilfsdev = node->nilfsdev;
158 return nilfs_dev_bread(nilfsdev, pblockno, flags, bpp);
161 return bread(node->vnode, vblocknr, node->nilfsdev->blocksize,
168 nilfs_get_segment_log(struct nilfs_device *nilfsdev, uint64_t *blocknr,
171 int blocksize = nilfsdev->blocksize;
184 error = nilfs_dev_bread(nilfsdev, *blocknr, 0, bpp);
202 struct nilfs_device *nilfsdev = node->nilfsdev;
220 error = nilfs_dev_bread(nilfsdev, btree_blknr, 0, &bp);
230 dptrs = dkeys + NILFS_BTREE_NODE_NCHILDREN_MAX(nilfsdev->blocksize);
381 nilfs_vtop(struct nilfs_device *nilfsdev, uint64_t vblocknr, uint64_t *pblocknr)
389 nilfs_mdt_trans(&nilfsdev->dat_mdt, vblocknr,
392 error = nilfs_bread(nilfsdev->dat_node, ldatblknr, 0, &bp);
439 error = nilfs_vtop(node->nilfsdev, vblocknr, pblocknr);
463 nilfs_load_segsum(struct nilfs_device *nilfsdev,
478 error = nilfs_get_segment_log(nilfsdev,
505 nilfs_load_super_root(struct nilfs_device *nilfsdev,
519 nsumblk = (segsum_size - 1) / nilfsdev->blocksize + 1;
534 error = nilfs_get_segment_log(nilfsdev,
536 size, (void *) &nilfsdev->super_root);
545 super_root = &nilfsdev->super_root;
548 comp_crc = crc32_le(nilfs_rw32(nilfsdev->super.s_crc_seed),
565 nilfs_search_super_root(struct nilfs_device *nilfsdev)
585 nilfsdev->super.s_last_pseg = nilfsdev->super.s_first_data_block;
586 nilfsdev->super.s_last_cno = nilfs_rw64(1);
589 ri->pseg = nilfs_rw64(nilfsdev->super.s_last_pseg); /* blknr */
590 ri->segnum = nilfs_get_segnum_of_block(nilfsdev, ri->pseg);
593 cno = nilfs_rw64(nilfsdev->super.s_last_cno);
598 error = nilfs_load_segsum(nilfsdev, ri);
607 error = nilfs_load_super_root(nilfsdev, ri);
616 nilfsdev->super;
635 nsumblk = (segsum_size - 1) / nilfsdev->blocksize + 1;
642 nilfs_get_segment_range(nilfsdev, ri->segnum, &seg_start, &seg_end);
645 ri->segnum = nilfs_get_segnum_of_block(nilfsdev, ri->pseg);
665 nilfs_get_node_raw(struct nilfs_device *nilfsdev, struct nilfs_mount *ump,
677 node->nilfsdev = nilfsdev;
774 uint32_t blocksize = dir_node->nilfsdev->blocksize;
869 uint32_t blocksize = dir_node->nilfsdev->blocksize;