Re: [RFC,4/5] squashfs: support multiple decompress stream buffer

From: Minchan Kim
Date: Mon Oct 07 2013 - 21:24:18 EST


On Mon, Oct 07, 2013 at 03:35:03PM +0900, Minchan Kim wrote:

< snip >

> > >
> > > ha, the superblock flags should only be needed at mount time. After
> > > mount time there shouldn't be anything in flags we need to look at.
> > >
> > > You need to do this because flags is needed for the decompressor init
> > > function (COMP_OPTS(flags)) which is now called after mount time.
> > >
> > > Once the compressor options parsing is moved back to being only
> > > at mount time, you won't need to store the flags anymore.
> >
> > Hmm, I'd like to clarify your point further.
> > I agree it's unnecessary performance degradation if we read compressor
> > option from storage whenever we create new stream buffer.
> > But we need it to create new stream buffer(ex, xz_dec_init) dynamically
> > so we should keep compressor option into somewhere. It means we should
> > keep it to somewhere although we remove flags field from msblk.
> > Am I missing something?
>
> I should have been more specific.
> My concern is that we could remove the flags from msblk but we need comp_opts
> to create new comp buffer dynamically so we should keep comp_opts into somewhere.
> So, I think best place to keep it is struct squashfs_sb_info like this.
>
> struct squashfs_sb_info {
> const struct squashfs_decompressor *decompressor;
> void *comp_opts;
> ...
> };
>
> What do you think about it?

So, this is my thought. Could you review this? I'd like to rebase other patches
on this.