We could use the "buffer_uptodate" flag on the buffer to signal that
the block has been checked. AFAIK, a new buffer will not be uptodate,
and once it is it will not be read from disk again... However, if a
user-space process read the buffer would also mark it uptodate without
doing the check... Maybe we should use a new BH_ pointer... Just need
to factor out the ext2_check_page() code so that it works on a generic
memory pointer and end pointer.
> > It turns out that in adding the checks for rec_len, I fixed my
> > original bug, but added another... Please disregard my previous
> > patch.
>
> In any event, I couldn't apply it due to patch giving a 'malformed'
> error - did you edit it after diffing? I'll wait for a revised patch -
> there's quite a lot of stuff in there including formatting changes,
> ext2 warnings, etc.
Yes, I think I had mentioned this in the patch, maybe not. I removed
all of the INDEX flag changes I had made from the resulting diff, so
I probably screwed up somewhere...
...(later)... I had a look at pulling out the ext2_check_page() code
so that it can be used for both ext2_get_page() and ext2_bread(), but
one thing concerns me - if we do checking on the whole page/buffer at
once, then any error in the page/buffer will discard all of the dir
entries in that page. In the old code, we would at least return all
of the entries up to the bad dir entry. Comments on this?
Cheers, Andreas
-- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/