diff options
| author | Robert Morris <rtm@csail.mit.edu> | 2011-08-12 09:25:39 -0400 |
|---|---|---|
| committer | Robert Morris <rtm@csail.mit.edu> | 2011-08-12 09:25:39 -0400 |
| commit | 2e59046362f532748711b9acaceee1cda969cc50 (patch) | |
| tree | 82ab693a2fa6021d445915c169354b6833262d24 /fs.c | |
| parent | bd71a45046eb13797284216c43353b9b6c92f18c (diff) | |
| download | xv6-labs-2022-2e59046362f532748711b9acaceee1cda969cc50.tar.xz xv6-labs-2022-2e59046362f532748711b9acaceee1cda969cc50.zip | |
log write() data
usertest for big write()s
push begin_trans/commit_trans down into syscalls
Diffstat (limited to 'fs.c')
| -rw-r--r-- | fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -437,13 +437,13 @@ writei(struct inode *ip, char *src, uint off, uint n) if(off > ip->size || off + n < off) return -1; if(off + n > MAXFILE*BSIZE) - n = MAXFILE*BSIZE - off; + return -1; for(tot=0; tot<n; tot+=m, off+=m, src+=m){ bp = bread(ip->dev, bmap(ip, off/BSIZE)); m = min(n - tot, BSIZE - off%BSIZE); memmove(bp->data + off%BSIZE, src, m); - bwrite(bp); + log_write(bp); brelse(bp); } |
