Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 2009 20:44:15 GMT
From:      Aditya Sarawgi <truncs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 169439 for review
Message-ID:  <200910122044.n9CKiFQC078686@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=169439

Change 169439 by truncs@aditya on 2009/10/12 20:43:31

	Add mutex for protecting the mount struct and fs.

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_mount.h#3 edit

Differences ...

==== //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_mount.h#3 (text+ko) ====

@@ -54,10 +54,16 @@
 	u_long	um_bptrtodb;			/* indir ptr to disk block */
 	u_long	um_seqinc;			/* inc between seq blocks */
 
+	struct mtx um_lock;			/* Protects ext2mount & fs */
+
 	struct g_consumer *um_cp;
 	struct bufobj *um_bo;
 };
 
+#define EXT2_LOCK(aa)	mtx_lock(&(aa)->um_lock)
+#define EXT2_UNLOCK(aa)	mtx_unlock(&(aa)->um_lock)
+#define EXT2_MTX(aa)	(&(aa)->um_lock)
+
 /* Convert mount ptr to ext2fsmount ptr. */
 #define VFSTOEXT2(mp)	((struct ext2mount *)((mp)->mnt_data))
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910122044.n9CKiFQC078686>