Example #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;
}
Example #2
0
	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;
	}