FreeBSD/sys/fs/ext2fs/ext2_vfsops.c
/*
 * Write a superblock and associated information back to disk.
 */
Write a superblock and associated information back to disk.
Write a superblock and associated information back to disk .
static int
ext2_sbupdate(struct ext2mount *mp, int waitfor)
{
	struct m_ext2fs *fs = mp->um_e2fs;
	struct ext2fs *es = fs->e2fs;
	struct buf *bp;
	int error = 0;
	bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0, 0);
	bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2fs));
	if (waitfor == MNT_WAIT)
		error = bwrite(bp);
	else
		bawrite(bp);
	return (error);
}
static int ext2_sbupdate ( struct ext2mount * mp , int waitfor ) { struct m_ext2fs * fs = mp -> um_e2fs ; struct ext2fs * es = fs -> e2fs ; struct buf * bp ; int error = 0 ; bp = getblk ( mp -> um_devvp , SBLOCK , SBSIZE , 0 , 0 , 0 ) ; bcopy ( ( caddr_t ) es , bp -> b_data , ( u_int ) sizeof ( struct ext2fs ) ) ; if ( waitfor == MNT_WAIT ) error = bwrite ( bp ) ; else bawrite ( bp ) ; return ( error ) ; }
Write a superblock and associated information back to disk.
Write a superblock and associated information back to disk .
/*
	 * The buffers for group descriptors, inode bitmaps and block bitmaps
	 * are not busy at this point and are (hopefully) written by the
	 * usual sync mechanism. No need to write them here.
	 */