Re: [PATCH V2 11/16] Squashfs: block operations

From: Evgeniy Polyakov
Date: Mon Nov 03 2008 - 09:12:18 EST


Hi.

On Wed, Oct 29, 2008 at 01:49:56AM +0000, Phillip Lougher (phillip@xxxxxxxxxxxxxxxxxxx) wrote:
> +int squashfs_read_data(struct super_block *sb, void *buffer,
> + long long index, int length, long long *next_index,
> + int srclength)
> +{
> + struct squashfs_sb_info *msblk = sb->s_fs_info;
> + struct buffer_head **bh;
> + int offset = index & ((1 << msblk->devblksize_log2) - 1);
> + long long cur_index = index >> msblk->devblksize_log2;
> + int avail, bytes, compressed, b = 0, k = 0;
> + int c_byte = length;
> +
> + bh = kcalloc((msblk->block_size >> msblk->devblksize_log2) + 1,
> + sizeof(*bh), GFP_KERNEL);

Could be great to have a memory pool though...

--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/