[PATCH resend] UBIFS: return -EINVAL if first log leb is empty

hujianyang hujianyang at huawei.com
Mon Feb 2 01:00:15 PST 2015


Hi Richard,

On 2015/2/2 16:20, Richard Weinberger wrote:
> Am 02.02.2015 um 04:10 schrieb hujianyang:
>> Another problem. Someone <markus.heininger at online.de> asked:
>>
>> "UBIFS: Is it possible to get the compressed size of a file?"
>>
>> I think it's an interesting problem. Actually we used to separate an UBI
>> device into several volumes for space management reason. So could we
>> realize the compressed size getting mechanism and import *quota* to UBIFS
>> itself.
> 
> You can get the actual size by accumulating the UBIFS data node sizes.

and xattr node sizes too? may store in another variable.

> But this means that you have to load the actual data node which is rather
> expensive. I had a short chat with Artem on this, we agreed that a nice solution
> would be to store the actual size in an inode. But that is a non-trivial change
> to UBIFS.
> 

Yes, old images may not store the actual size and it's hard to
get compressed size from this kind of images by a new driver.

Users may get actual size from an ioctl call and maybe we could
return an error if this feature is not supported. How about
increasing file-system driver version and applying actual size
support in a higher version? or mark this feature as a flag
in super_node?

Another 'expensive' implement is whole scan the partition to
get the actual size of a required file in the old images.

What's your plan after that chat?


BR,
Hu




More information about the linux-mtd mailing list