PERFORCE change 190013 for review
Zheng Liu
lz at FreeBSD.org
Mon Mar 14 09:56:47 UTC 2011
http://p4web.freebsd.org/@@190013?ac=10
Change 190013 by lz at freebsd-dev on 2011/03/14 09:56:33
Invalidate cluster summary information in ext2_reload().
Affected files ...
.. //depot/projects/soc2010/extfs/src/sys/fs/ext2fs/ext2_vfsops.c#13 edit
Differences ...
==== //depot/projects/soc2010/extfs/src/sys/fs/ext2fs/ext2_vfsops.c#13 (text+ko) ====
@@ -407,7 +407,7 @@
* Things to do to update the mount:
* 1) invalidate all cached meta-data.
* 2) re-read superblock from disk.
- * 3) re-read summary information from disk.
+ * 3) invalidate all cluster summary information.
* 4) invalidate all inactive vnodes.
* 5) invalidate all cached file data.
* 6) re-read inode data for all active vnodes.
@@ -421,6 +421,7 @@
struct buf *bp;
struct ext2fs *es;
struct m_ext2fs *fs;
+ struct csum *sump;
int error;
int i;
int32_t *lp;
@@ -455,20 +456,24 @@
return (error);
}
- /*
- * FIXME: It seems that we don't need to do something
- * for reallocblk.
+#ifdef UNKLAR
+ if (fs->fs_sbsize < SBSIZE)
+ bp->b_flags |= B_INVAL;
+#endif
+ brelse(bp);
+
+ /*
+ * Step 3: invalidate all cluster summary information.
*/
if (fs->e2fs_contigsumsize > 0) {
lp = fs->e2fs_maxcluster;
- for (i = 0; i < fs->e2fs_gcount; i++)
+ sump = fs->e2fs_clustersum;
+ for (i = 0; i < fs->e2fs_gcount; i++, sump++) {
*lp++ = fs->e2fs_contigsumsize;
+ sump->cs_init = 0;
+ bzero(sump->cs_sum, fs->e2fs_contigsumsize + 1);
+ }
}
-#ifdef UNKLAR
- if (fs->fs_sbsize < SBSIZE)
- bp->b_flags |= B_INVAL;
-#endif
- brelse(bp);
loop:
MNT_ILOCK(mp);
@@ -525,11 +530,11 @@
struct cdev *dev = devvp->v_rdev;
struct g_consumer *cp;
struct bufobj *bo;
+ struct csum *sump;
int error;
int ronly;
int i, size;
int32_t *lp;
- struct csum *sump;
ronly = vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0);
/* XXX: use VOP_ACESS to check FS perms */
More information about the p4-projects
mailing list