diff options
author | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2022-07-01 07:50:48 +0900 |
---|---|---|
committer | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2022-07-27 03:11:48 +0900 |
commit | 04d166f9a90db05958a3f2ed713244724d2b9004 (patch) | |
tree | 3d2af8a9e326414697be709f77a342dda75028f3 /README | |
parent | 0020f0b6e079690e843d57cbfa48a04830f5b79c (diff) |
Add README to describe librefop algorithm
This patch add README, that have overview of this library and algorithm.
Bug-AGL: SPEC-4500
Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Change-Id: I6eed0d004e7cebddbd3a3b08da07ebdbf1a3048c
Diffstat (limited to 'README')
-rw-r--r-- | README | 208 |
1 files changed, 208 insertions, 0 deletions
@@ -0,0 +1,208 @@ +Redundancy file operation library (librefop) + +Redundancy file operation library is a another implementation for the backup +manager of AGL base system. It aim to tiny implementation. + + +File operation algorithm + +New data write - case 1.. + +1-0. Initial state. + + -------- +| latest | +| file | + -------- + +1-1. Create new file. + + -------- +| New | +| file | + -------- + + -------- +| latest | +| file | + -------- + +1-2. Rename from latest file to backup file. + + -------- +| New | +| file | + -------- + + -------- + --> | backup | + rename | file | + -------- + +1-3. Create new data file. + + | rename from new to latest + -------- -------- +| latest | | backup | +| file | | file | + -------- -------- + +1-4. Done. + + +New data write - case 2. + +2-0. Initial state. + + -------- -------- +| latest | | backup | +| file | | file | + -------- -------- + +2-1. Create new file. + + -------- +| New | +| file | + -------- + + -------- -------- +| latest | | backup | +| file | | file | + -------- -------- + +2-2. Remove backup file. + + -------- +| New | +| file | + -------- + + -------- +| latest | remove +| file | backup file + -------- + +2-3. Rename from latest file to backup file. + + -------- +| New | +| file | + -------- + + -------- + --> | backup | + rename | file | + -------- + +2-4. Create new data file. + + | rename from new to latest + -------- -------- +| latest | | backup | +| file | | file | + -------- -------- + +2-5. Remove oldest backup file. + + -------- -------- +| New | | backup | +| file | | file | + -------- -------- + +2-6. Done. + + +Recovery from abnormal conditions. + +Note. 'p1,p2' is a file selection priority. [High pri.] p1 > p2 [Low pri.] + +ac1. Nodata + +Return a no data. + + +ac2. Latest file only. + + -------- +| latest | +| file | + -------- + p1 + +Return data from a latest file. + + +ac3. Backup file only. + + -------- + | backup | + | file | + -------- + p1 + +Return data from a backup file. + + +ac4. Have a two file (normal condition). + + -------- -------- +| latest | | backup | +| file | | file | + -------- -------- + p1 p2 + +Return data from a latest file. + + +ac5. Latest file and new file. + + -------- +| New | +| file | + -------- + + -------- +| latest | +| file | + -------- + p1 + +Return data from a new file. Typically new file may not completed write operation. + + +ac6. Backup file and new file. + + -------- +| New | +| file | + -------- + + -------- + | backup | + | file | + -------- + p1 + +Return data from a backup file. Typically new file may not completed write operation. + + +ac7. Latest file and backup file and new file. + + -------- +| New | +| file | + -------- + + -------- -------- +| latest | | backup | +| file | | file | + -------- -------- + p1 p2 + +Return data from a latest file. Typically new file may not completed write operation. + +When the data block of high priority file was broken, this library select next priority file. + + + |