RE: [Yaffs] Avoid tagsEccUnfixed stats bump on mounting part…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Marty Fouts
Date:  
To: Todd Poynor, yaffs
Old-Topics: RE: [Yaffs] Avoid tagsEccUnfixed stats bump on mounting partially usedblock
Subject: RE: [Yaffs] Avoid tagsEccUnfixed stats bump on mounting partiallyusedblock

Applied to CVS just now.

Marty
-----Original Message-----
From:
[mailto:yaffs-bounces@stoneboat.aleph1.co.uk]On Behalf Of Martin Fouts
Sent: Thursday, November 17, 2005 11:53 PM
To: Todd Poynor;
Subject: RE: [Yaffs] Avoid tagsEccUnfixed stats bump on mounting
partiallyusedblock


Thanks. I've added the patch to my queue.

marty

> -----Original Message-----
> From:
> [mailto:yaffs-bounces@stoneboat.aleph1.co.uk] On Behalf Of Todd Poynor
> Sent: Thursday, November 17, 2005 8:10 PM
> To:
> Subject: [Yaffs] Avoid tagsEccUnfixed stats bump on mounting
> partially usedblock
>
> IIUC, yaffs1 compatibility mode checks tags ECCs and updates
> stats on tags ECC errors when scanning an unused chunk of a
> partially-allocated block at mount time. This causes a
> mildly alarming "tagsEccUnfixed..... 1" in /proc/yaffs.
> Suggested fix below.
>
> Signed-off-by: Todd Poynor <>
>
> Index: yaffs_tagscompat.c
> ===================================================================
> RCS file: /home/aleph1/cvs/yaffs2/yaffs_tagscompat.c,v
> retrieving revision 1.7
> diff -u -r1.7 yaffs_tagscompat.c
> --- yaffs_tagscompat.c    20 Sep 2005 23:12:38 -0000    1.7
> +++ yaffs_tagscompat.c    18 Nov 2005 04:03:47 -0000
> @@ -455,20 +455,22 @@
>              int deleted =
>                  (yaffs_CountBits(spare.pageStatus) 
> < 7) ? 1 : 0;

>
> -            yaffs_GetTagsFromSpare(dev, &spare, &tags);
> -
>              eTags->chunkDeleted = deleted;
> -            eTags->objectId = tags.objectId;
> -            eTags->chunkId = tags.chunkId;
> -            eTags->byteCount = tags.byteCount;
> -            eTags->serialNumber = tags.serialNumber;
>              eTags->eccResult = eccResult;
>              eTags->blockBad = 0;    /* We're reading it */
>              /* therefore it is not a bad block */
> -
>              eTags->chunkUsed =
>                  (memcmp(&spareFF, &spare, 
> sizeof(spareFF)) !=
>                   0) ? 1 : 0;
> +
> +            if (eTags->chunkUsed) {
> +                yaffs_GetTagsFromSpare(dev, 
> &spare, &tags);
> +
> +                eTags->objectId = tags.objectId;
> +                eTags->chunkId = tags.chunkId;
> +                eTags->byteCount = tags.byteCount;
> +                eTags->serialNumber = tags.serialNumber;
> +            }
>          }

>
>          return YAFFS_OK;

>
> _______________________________________________
> yaffs mailing list
>
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>


_______________________________________________
yaffs mailing list

http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs