Revert "Introduce and use sleeplocks instead of BUSY flags"

My changes have a race with re-used bufs and the code doesn't seem to get shorter
Keep the changes that fixed ip->off race

This reverts commit 3a5fa7ed90.

Conflicts:

	defs.h
	file.c
	file.h
This commit is contained in:
Frans Kaashoek 2011-08-29 17:18:40 -04:00
parent 22f7db5336
commit 1ddfbbb194
12 changed files with 61 additions and 105 deletions

7
file.h
View file

@ -15,9 +15,7 @@ struct inode {
uint dev; // Device number
uint inum; // Inode number
int ref; // Reference count
int flags; // I_VALID
struct spinlock lock;
struct sleeplock sleeplock;
int flags; // I_BUSY, I_VALID
short type; // copy of disk inode
short major;
@ -27,7 +25,8 @@ struct inode {
uint addrs[NDIRECT+1];
};
#define I_VALID 0x1
#define I_BUSY 0x1
#define I_VALID 0x2
// device implementations