Re: [Yaffs] What a chunk ID of -1 means ?

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
+ (text/html)
Eliminar este mensaje
Responder a este mensaje
Autor: Patrice LAPORTE
Fecha:  
A: yaffs@stoneboat.aleph1.co.uk
Asunto: Re: [Yaffs] What a chunk ID of -1 means ?
Hi all,

(I answer to myself)

Actually I made some mistake in my logs, and in my explanations in the previous thread : it's not the chunk -1 that is not found, but another chunk number, positive one. After some analysis with a colleague, it appears that this happens each time someone is writing to a file that will grow and will need a new page/chunk. In that case the next chunk ID is computed and looked for but it does not exist yet, so it's not found, and so this log message.

I will do some test around this, but it looks relevant.

What do you think about this ?

Regards
Patrice

>Author: Patrice LAPORTE<mailto:patrice.laporte@schneider-electric.com>
>Date: 2017-03-16 15:222017-03-16 14:22 +100UTC
>To: <mailto:yaffs@stoneboat.aleph1.co.uk>
>Subject: [Yaffs] What a chunk ID of -1 means ?
>Hi all,


>Among other things I'm going back to some kind of "file system" investigation on our product, and I'm adding some trace.
>
>One trace I have questions about is this one, from function "yaffs_rd_data_obj" : "chunk -1 not found, zero instead". The comment in the function tells that maybe we are reading a hole, so the buffer is memset to 0.
>
>But in my case I'm 99% sure there is no way our app is creating files with holes.
>
>Based on yaffs onli documentation (http://www.yaffs.net/documents/how-yaffs-works#How_various_mechanisms_work) : "ChunkId: Identifies where in the file this chunk belongs. A chunkId of zero signifies that this chunk contains an >objectHeader. ChunkId==1 signifies the first chunk in the file (ie. At file offset 0), chunkId==2 is the next chunk and so on."
>
>I can understand chunk 0 or more, but I can't find information about a chunk ID of -1. The messages look to be present at startup, maybe during mount/scanning, but I don't see them during normal life of the product.
>
>Since I added this log, people are seeing them and some of them start to panic, and I have to understand :) But since the product is working very fine, I thing this -1 is normal, but I'd like to know what it means.
>
>Is any one of you can make this chunk -1 more clear ?
>
>Best regards
>Patrice