Re: ext4: cache all of an extent tree's leaf block upon reading

From: Dave Jones
Date: Thu Sep 05 2013 - 11:15:15 EST


On Thu, Sep 05, 2013 at 10:53:34AM -0400, Theodore Ts'o wrote:

> > ext4_es_store_pblock or's the pblk with the existing contents of the struct member.
> > (albeit masked with ES_MASK)
> >
> > Should there be a
> >
> > newes.es_pblk = 0;
> >
> > up there too ?
>
> The next line after ext4_es_store_pblock() is:
>
> ext4_es_store_status(&newes, status);
>
> This will set remaining ES_WRITTEN | ES_UNWRITTEN... bits.
>
> So the only reason to add a line explicitly setting es_pblk to zero
> would be to suppress a warning from some insufficiently smart static
> code analysis tool. I didn't see a warning from gcc, but it's
> possible that this is something which is causing Coverity or some
> other code scanner heartburn.

Yep, that's what picked it up. I'll add a 'not a bug' annotation to stop
it getting flagged again. This was the only ext* issue that Coverity
picked up from yesterdays merge btw, which I guess is good news ;)

Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/