Re: [PATCH v4 5/6] fat: permit to return phy block number by fibmap in fallocated region

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Namjae Jeon <linkinjeon@xxxxxxxxx> writes:

> +int fat_bmap2(struct inode *inode, sector_t sector,
> +	      unsigned long *mapped_blocks, struct buffer_head *bh_result,
> +	      int create, sector_t *bmap)
> +{
> +	struct super_block *sb = inode->i_sb;
> +	sector_t last_block;
> +	const unsigned long blocksize = sb->s_blocksize;
> +	const unsigned char blocksize_bits = sb->s_blocksize_bits;
> +
> +	BUG_ON(create != 0);
> +
> +	*bmap = 0;
> +	*mapped_blocks = 0;
> +
> +	last_block = (MSDOS_I(inode)->i_disksize + (blocksize - 1))
> +		>> blocksize_bits;
> +
> +	if (sector >= last_block)
> +		return 0;
> +
> +	return fat_get_mapped_cluster(inode, sector, last_block, mapped_blocks,
> +				      bmap);

Maybe, we are better to merge fat_bmap2() and fat_get_block_bmap()?
fat_bmap2() seems to be pointless.
-- 
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux