예제 #1
0
static int blkdev_get_block(struct inode * inode, long iblock, struct buffer_head * bh, int create)
{
	if (iblock >= max_block(inode->i_rdev))
		return -EIO;

	bh->b_dev = inode->i_rdev;
	bh->b_blocknr = iblock;
	bh->b_state |= 1UL << BH_Mapped;
	return 0;
}
예제 #2
0
파일: fr.hpp 프로젝트: a59566/project_study
	int check_maxfree_slot(const std::vector<int>& edge_bit_mask)
	{
		int max_free_slot = max_block(edge_bit_mask).second;
		return max_free_slot;
	}