mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Daniel Phillips <phillips@bonn-fries.net>
Cc: Andreas Dilger <adilger@turbolinux.com>,
	Alexander Viro <viro@math.psu.edu>,
	Linux kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][CFT] (updated) ext2 directories in pagecache
Date: Sat, 12 May 2001 15:41:16 -0600 (MDT)	[thread overview]
Message-ID: <200105122141.f4CLfH7G001009@webber.adilger.int> (raw)
In-Reply-To: <01051122200102.01990@starship> "from Daniel Phillips at May 11, 2001 10:20:01 pm"

Daniel writes:
> Oh yes, I'm well aware it, that's what I mean by the "bullet proofing" 
> item on my to-do list.  I don't quite agree with the idea of embedding 
> the checking of directory entry format inside the ext2_get_page 
> routine, it should be moved outside ext2_get_page, on basic principal.
> Never mind that this routine is only used to get pages of directory 
> files, it's still not nice.  Anyway, I think the thing to do is graft a 
> similar one-time check onto ext2_bread.  We can't use Al's PG_checked 
> mechanism because we might have read only one buffer out of several on 
> the page.

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

  reply	other threads:[~2001-05-12 21:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-11  7:10 Andreas Dilger
2001-05-11  7:19 ` Alexander Viro
2001-05-11 16:34   ` Andreas Dilger
2001-05-11 20:20     ` Daniel Phillips
2001-05-12 21:41       ` Andreas Dilger [this message]
2001-05-12 22:18         ` Alexander Viro
2001-05-13  2:13           ` Daniel Phillips
2001-05-13  2:34         ` Daniel Phillips
2001-05-14 18:33           ` Andreas Dilger
2001-05-14 19:29             ` Daniel Phillips
2001-05-14 21:50             ` Daniel Phillips
2001-05-16  3:11               ` Daniel Phillips
2001-05-11 13:02 ` Daniel Phillips
  -- strict thread matches above, loose matches on Subject: below --
2001-05-10 20:53 Andreas Dilger
2001-05-11  1:10 ` Daniel Phillips
2001-05-10  7:21 Andreas Dilger
2001-05-13 22:15 ` Daniel Phillips
2001-05-14 20:04   ` Andreas Dilger
2001-05-14 22:18     ` Daniel Phillips
2001-05-14 22:23     ` Daniel Phillips
2001-05-06 23:16 Daniel Phillips
2001-05-09 21:22 ` Andreas Dilger
2001-05-11  1:04   ` Daniel Phillips
2001-05-03 21:10 Daniel Phillips
2001-05-03 22:59 ` Albert Cranford
     [not found] <01050303150500.00633@starship>
2001-05-03  1:43 ` Daniel Phillips
2001-04-29 20:35 Daniel Phillips
2001-05-02  3:03 ` Albert Cranford
2001-04-12 16:33 [PATCH][CFT] " Alexander Viro
2001-04-23 22:21 ` [PATCH][CFT] (updated) " Alexander Viro
2001-04-28 18:16   ` Alexander Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200105122141.f4CLfH7G001009@webber.adilger.int \
    --to=adilger@turbolinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@bonn-fries.net \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®