Minor fixes to comments.
[AROS.git] / rom / filesys / afs / README.comments
blobbd3fb38fa99a39d9622d56d7e5dc96804083f08c
1 The cases when to fill BLK_NEXT_DATA of a previously written OFS-DataBlock
4 writeData()
5         block=headerblock
6         filekey=BLK_TABLE_END
7 +       byte=0                          dont mark block before (we are the first block)
8         byte=any                        dont mark block before (we are the first block)
9         filekey=any
10 *       byte=0                          mark block before (if still not marked)
11         byte=any                        dont mark block before (the case above was already enterd)
12         filekey=BLK_TABLE_START-1
13 *       byte=0                          mark block before (if still not marked)
14         byte=any                        dont mark block before (the case above was already enterd)
15         block=extensionblock
16         filekey=BLK_TABLE_END
17 +       byte=0                          dont mark block before (the case before does that work)
18         byte=any                        dont mark block before (the case above was already enterd)
19         filekey=any
20 *       byte=0                          mark block before (if still not marked)
21         byte=any                        dont mark block before (the case above was already enterd)
22         filekey=BLK_TABLE_START-1
23 *       byte=0                          mark block before (if still not marked)
24         byte=any                        dont mark block before (the case above was already enterd)
26 You can see that you change BLK_NEXT_DATA only if byte=0 (*). But there are
27 two cases where byte=0 and we shouldnt fill BLK_NEXT_DATA (+). The first of these
28 is, if writeData was called directly after an Open(). In that case filekey
29 equal BLK_TABLE_END. In the other case filekey is also BLK_TABLE_END but
30 the current block is not the first block. But we dont get into this case because
31 filekey is immediatly decreased if byte=0 (byte<>0 is already rejected).