summaryrefslogtreecommitdiff
path: root/fs.h
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-06 13:54:03 -0400
committerRobert Morris <[email protected]>2019-06-06 13:54:03 -0400
commit91ba81110acd3163f7de3580b677eece0c57f5e7 (patch)
tree670536a7f365e75282048b5447a107338b677642 /fs.h
parent8607051b5fc79fffa319b913b19e99bc5b90e063 (diff)
downloadxv6-labs-91ba81110acd3163f7de3580b677eece0c57f5e7.tar.gz
xv6-labs-91ba81110acd3163f7de3580b677eece0c57f5e7.tar.bz2
xv6-labs-91ba81110acd3163f7de3580b677eece0c57f5e7.zip
gdb backtraces: -ggdb, -fno-omit-frame-pointer, BSIZE=1024
Diffstat (limited to 'fs.h')
-rw-r--r--fs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs.h b/fs.h
index 56f0558..bc0805f 100644
--- a/fs.h
+++ b/fs.h
@@ -2,8 +2,8 @@
// Both the kernel and user programs use this header file.
-#define ROOTINO 1 // root i-number
-#define BSIZE 512 // block size
+#define ROOTINO 1 // root i-number
+#define BSIZE 1024 // block size
// Disk layout:
// [ boot block | super block | log | inode blocks |
@@ -48,7 +48,7 @@ struct dinode {
#define BPB (BSIZE*8)
// Block of free map containing bit for block b
-#define BBLOCK(b, sb) (b/BPB + sb.bmapstart)
+#define BBLOCK(b, sb) ((b)/BPB + sb.bmapstart)
// Directory is a file containing a sequence of dirent structures.
#define DIRSIZ 14