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

Re: [linux-lvm] LVM 0.8final for 2.2.15/2.2.16?



On Thu, Jun 08, 2000 at 02:22:14AM +0000, Michael Marxmeier wrote:
> > 
> > On Wed, 7 Jun 2000, Jan Niehusmann wrote:
> > 
> > > The snapshot logic simply doesn't know what a filesystem is. It just
> > > clones the block device.
> > 
> > this i knew.. :)
> > 
> > > So the fs may be in en inconsistent state, if you do the snapshot
> > > while some write operation is in progress on the cloned
> > > filesystem.
> > 
> > ok. so the solution is what? a call in the vfs to complete pending
> > writes, and hold off on modifying any blocks?
> 
> IMHO when creating a snapshot LVM could simply sync all outstanding
> buffers for the block device vialog block_fsync() (not sure if this
> is already done -- Heinz care to comment?).

Yes, in case a new snapshot is created the buffers of the original LV
are flushed using fsync_dev(). Please have a look at the end of
lvm_do_lv_create() in lvm.c.

> This should also take care of pending fs meta information thus
> we should get a consistent state.
> 
> The question is how atomic this is? Since fsync_dev() currently
> does a lock_kernel() is might even be sufficient.

It should do the job (see comment bellow).

> 
> 
> Any reason why this is not suffiecient?

The only case could be any kind of "private" metadata a filesystem keeps
outside the cache.
Any comments on that?

Heinz

-- 

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

Heinz Mauelshagen                                Sistina Software Inc.
Senior Consultant/Developer                      Bartningstr. 12
                                                 64289 Darmstadt
                                                 Germany
Mauelshgen Sistina com                           +49 6151 710386
                                                      FAX 710396
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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