[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: PV_FLUSH and ext3 (was Re: max mount count)



On Fri, Jun 08, 2001 at 01:56:01PM -0600, Andreas Dilger wrote:
> Stephen writes:
> > However, I'm still nervous: journaling can keep buffers around for
> > quite a while for various reasons.  WHY does LVM want to invalidate
> > buffers?  I'm scared that by "fixing" this we actually mask a deeper
> > problem.  By causing journaled buffers to remain in the system after
> > an invalidate, are we going to violate some assumption that LVM is
> > making about its ability to flush things from the kernel?
> 
> I'm not sure exactly why this is done.  There are some issues w.r.t. the
> fact that the LVM user tools write metadata directly into the device,
> but for snapshots the I/O is done from the kernel via kiobufs.
> 
> There is no other LVM metadata I/O from the kernel, AFAIK.

That's true today. I/O for the snapshots data (IOW: the COW chunks read/written)
and the snapshot's metadata (IOW: the COW exception table which keeps track of
the written chunks) is done from within the kernel.

We will extend that in post 1.0 to *all* metadata reads from within the kernel.

> 
> The PV_FLUSH code was added to LVM a while ago, so it is probably not
> possible to find the reasons in the CVS changelogs or the mailing list
> archive.
> 
> I've cc'd Heinz, maybe he can tell us why PV_FLUSH is called on all PVs
> when doing pvscan/vgscan/etc?

Reason is to make sure, that data comes from the physical device rather
than from the buffer cache so that I can be sure, that the device is at least
accessable when metadata is read. Could be replaced by a kiobuf based solution
in the future; wasn't available when I build 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

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen Sistina com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]