Fedora Core 5 common issues and bugs

Peter Jones pjones at redhat.com
Thu Mar 30 16:11:28 UTC 2006


On Thu, 2006-03-30 at 01:50 +0200, Rob van Nieuwkerk wrote:
> On Wed, 29 Mar 2006 14:26:26 -0500
> Peter Jones <pjones at redhat.com> wrote:
> 
> > On Wed, 2006-03-29 at 19:51 +0200, Rob van Nieuwkerk wrote:
> > 
> > > Sure.  Or something like this:
> > > 
> > > 	dd conv=idirect if=/dev/cdrom count=right_number | sha1sum
> > > 
> > > And if the dd used on the FC ISO does not support the O_DIRECT feature,
> > > just add it.  Or write a completely trivial 10 line C program that
> > > does the same.
> > 
> > This will almost always get you the wrong result.  At the very least,
> > you need 'bs=2048 count="$(($(isosize /dev/cdrom) / 2048))"' with that,
> > or you wind up doing md5sum on completely bogus data with some media.
> > 
> > But as it turns out, that fails the exact same way that mediacheck does.
> > 
> > > I really never understood why there never has been any trivial
> > > work-around on the FC images for this very annoying problem.
> > 
> > dd does read(2) just like mediacheck does.  There isn't some spooky
> > magic here.  It fails in exactly the same ways for exactly the same
> > reasons.
> 
> Hi Peter,
> 
> Did you miss the O_DIRECT part ?
> 
> A read(2) on an fd opened with O_DIRECT should never lead to any readahead
> by the kernel.  On the device level *only* the blocks requested by the
> userspace read() are read.  Nothing more.

I'm not going say you're wrong.  As far as I can tell from staring at
the code, O_DIRECT would eliminate that failure from mediacheck.  But
AFAICS there's no way to make the same effective change to the block
layer's behavior for accesses through a filesystem.

So what I am saying is that this is a bad idea.  It creates a case where
mediacheck succeeds but installations may fail anyway.

That's worse than the current situation.

Even if we could affect the same change on the mounted case, it'd mean
slower installs and everybody would complain about it.  What's needed is
for readahead to be fixed so that you don't get an error (or bogus data)
unless you actually ask for a sector that should result in error.  What
you're saying is to disable readahead entirely.

-- 
  Peter




More information about the fedora-devel-list mailing list