Fix last commit. The last block of the file system may have changed
even if the last cylinder group is not modified.
This commit is contained in:
parent
12c1fb5b6d
commit
cad9d39281
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.13 2005/04/24 15:49:37 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.14 2005/05/03 09:43:23 hannken Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_ffs.h"
|
||||
@ -292,15 +292,12 @@ ffs_snapshot(mp, vp, ctime)
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
microtime(&starttime);
|
||||
/*
|
||||
* If the last cylinder group has changed the last block
|
||||
* saved before may have changed too so update it now.
|
||||
* The last block saved before may have changed so update it now.
|
||||
*/
|
||||
if (!ACTIVECG_ISSET(fs, fs->fs_ncg-1)) {
|
||||
if ((error = readfsblk(vp, cgbuf, numblks - 1)) != 0)
|
||||
goto out1;
|
||||
if ((error = writevnblk(vp, cgbuf, numblks - 1)) != 0)
|
||||
goto out1;
|
||||
}
|
||||
if ((error = readfsblk(vp, cgbuf, numblks - 1)) != 0)
|
||||
goto out1;
|
||||
if ((error = writevnblk(vp, cgbuf, numblks - 1)) != 0)
|
||||
goto out1;
|
||||
/*
|
||||
* First, copy all the cylinder group maps that have changed.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user