minix/servers/mfs/clean.h
Ben Gras 9a664b4984 mfs: restore readonly mounting
. use dirty marking hooks to check and warn
	  when inodes/bufs are marked dirty on a readonly
	  mounted fs
	. add readonly mount checks to restore readonly
	  mounting

Signed-off-by: Ben Gras <ben@minix3.org>
2011-12-22 01:29:27 +01:00

12 lines
403 B
C

#ifndef _MFS_CLEAN_H
#define _MFS_CLEAN_H 1
#define MARKDIRTY(b) do { if(superblock.s_dev == (b)->b_dev && superblock.s_rd_only) { printf("%s:%d: dirty block on rofs! ", __FILE__, __LINE__); util_stacktrace(); } else { (b)->b_dirt = BP_DIRTY; } } while(0)
#define MARKCLEAN(b) ((b)->b_dirt = BP_CLEAN)
#define ISDIRTY(b) ((b)->b_dirt == BP_DIRTY)
#define ISCLEAN(b) ((b)->b_dirt == BP_CLEAN)
#endif