[PATCH 0/3] ubifs: add lz4hc compression

Hyunchul Lee hyc.lee at gmail.com
Tue Feb 28 17:12:24 PST 2017


On Tue, Feb 28, 2017 at 12:17:05PM +0200, Artem Bityutskiy wrote:
> On Tue, 2017-02-28 at 14:16 +0900, Hyunchul Lee wrote:
> > Another compression type cannot be added any more in respect that
> > type of
> > ubifs_inode's compr_type is "unsigned:2" and there are 4 compression
> > types.  There may be overflow in assignment to compr_type, and
> > prevision 
> > version of ubifs is trying to decompress file with wrong compression
> > type.
> 
> But this is just an in-memory inode structure, and you can change it,
> just increase the size of 'compr_type'.

yes, it is an in-memory inode. but i think that there can be problem of 
backward compatibility. for example, if ubifs_ino_node's compr_type is
4 in flash, the previous version of ubifs could misinterpret it as 0,
because ubifs_inode's compr_type(2-bit) is assigned
ubifs_ino_nodes' compr_type at ubifs_iget.

thank you for comment.
Hyunchul



More information about the linux-mtd mailing list