enabling and disabling file compression

Tomeu Vizoso tomeu at tomeuvizoso.net
Mon Oct 13 12:50:23 EDT 2008


On Mon, Oct 13, 2008 at 6:46 PM, Deepak Saxena <dsaxena at laptop.org> wrote:
> On Oct 13 2008, at 14:59, Tomeu Vizoso was caught saying:
>> Hi Chris and Deepak,
>>
>> in Ubifs, I have tried unsetting the compression xattr on files, but
>> reads were equally slow so I guess the contents weren't actually
>> uncompressed. Even tried dd'ing to an empty existing file without the
>> c attribute, but the result was the same. Any idea what I'm doing
>> wrong?
>
> I _think_ the slowness we are seeing might be a side effect of me having
> enabled various debug messages in both the UBI and UBIFS layer. I am
> rebuilding the image with a new kernel and will post after I do some
> testing here.

Nice, is there any other way I can check if the file is stored
compressed or not? 'du' should show a different value?

>> Chris, I think you worked on improving the control of on-the-fly
>> compression in jffs2, can we control it using the c attribute as in
>> ubifs?
>
> I've talked to David Woodhouse about this in the past and it shouldn't
> be too hard to do as the ioctl() handler is already in place, it just
> means adding a flag to the inode (and each block?) and a check at
> read()/write() time.
>
> One question I've wondered about is what is the meaning of disabling
> compression on a file that has already been written to flash compressed?
> Do we decompress the file and re-write it to flash or do we just
> wait until an update that touches the data?

If possible, I'd like if the file was compressed/decompressed at the
same moment as the xattr is changed, but if we need to do some dance,
we'll do it.

Thanks,

Tomeu



More information about the Devel mailing list