Fufu Fang
ebcfb0a79e
periodic backup
2021-09-04 03:00:25 +01:00
Fufu Fang
939e287c87
adjusted includes
2021-09-03 21:39:31 +01:00
Fufu Fang
cd6bb5bee8
more refactoring
2021-09-03 14:56:11 +01:00
Fufu Fang
c64a139b46
refactoring transfer_blocking
2021-09-03 12:40:35 +01:00
Fufu Fang
31f8509f42
moved the *sonic related fields into a separate struct
2021-09-01 21:29:13 +01:00
Fufu Fang
8f9935ee5d
moved cache_opened to cache.h
2021-09-01 10:39:33 +01:00
Fufu Fang
45d8cb8136
changed indentation style
2021-08-31 11:18:39 +01:00
Fufu Fang
f791ceb308
shortened error log format, changed indentation style
2021-08-31 11:15:00 +01:00
Fufu Fang
f3d5ffc3fc
now cache works on subsonic server
2019-10-24 02:15:05 +01:00
Fufu Fang
5062f511bd
Finished writing the code to generate Subsonic LinkTable
...
- Also refactored various bits and pieces
2019-10-23 21:04:25 +01:00
Fufu Fang
bc23ee03a2
Fixed regression: LinkTable caching now works again.
2019-09-04 19:53:11 +01:00
Fufu Fang
56e1095287
tidying stuff up
2019-09-04 17:43:30 +01:00
Fufu Fang
eb463478a8
The background download thread is being spawned again.
2019-09-02 15:47:10 +01:00
Fufu Fang
6c8a15d8cc
Fixed buffer over-read at the boundary.
...
- Say we are using a lock size of 1024k, we send a request for 128k at 1008k. It won't trigger the download, because we already download 1024k at 0. So it would read off from the empty disk space!
- This problem only occurs during the first time you download a file. During subsequent accesses, when you are only reading from the cache, this problem does not occur.
2019-09-02 15:19:41 +01:00
Fufu Fang
9e3e4747ae
fixed Cache_bgdl()
...
- Cache_bgdl() used to corrupt the cache file
2019-09-02 09:04:20 +01:00
Fufu Fang
ed5457c76f
Bugfix: partially fixed the cache lock
...
- now when the same file is opened twice, the fread() output is consistent.
2019-09-01 11:39:47 +01:00
Fufu Fang
20f30a0e38
Tidied up some of the comments and formatting
2019-09-01 08:52:18 +01:00
Fufu Fang
92a9658c66
Cache system bug fix
...
- Now keep track of the number of times a file has been opened. The on-disk
cache file no longer gets opened multiple times, if a file is opened multiple
times.
2019-09-01 00:43:50 +01:00
Fufu Fang
283520136c
Closing issue #33 , now set a default cache directory
2019-04-30 08:06:09 +01:00
Fufu Fang
4acf91a2b8
added --max-seg-count command line option
2019-04-27 04:52:39 +01:00
Fufu Fang
2cee4b33a7
cosmetic changes
2019-04-26 23:29:16 +01:00
Fufu Fang
3c0a5fdf65
removed excess #include directive
2019-04-26 23:10:09 +01:00
Fufu Fang
825bd4d3fb
added the command line switch to control the download segment size
2019-04-25 21:34:07 +01:00
Fufu Fang
df025b1caf
improved the correctness of Cache_bgdl()
2019-04-25 08:50:04 +01:00
Fufu Fang
e442871899
added Cache_background_download() to enable the download of the next block
2019-04-24 23:58:26 +01:00
Fufu Fang
cc1697894b
Resolved race condition - this code is now considered as stable.
...
Reference:
https://wiki.sei.cmu.edu/confluence/display/c/FIO24-C.+Do+not+open+a+file+that+is+already+open
2019-04-24 04:28:54 +01:00
Fufu Fang
2ebf37fb65
fixed doxygen warnings
2019-04-24 04:28:54 +01:00
Fufu Fang
0892cd0a8a
changed header inclusion order
2019-04-24 04:28:54 +01:00
Fufu Fang
3a0c431bba
Stability improvement
...
Metadata corruption still occasionally happens when it gets read in.
I suspect it is due to some sort of race condition.
2019-04-24 04:28:54 +01:00
Fufu Fang
6536163f98
improve cached dataset creation process, better error handling
2019-04-24 04:28:46 +01:00
Fufu Fang
e166098162
updated README, also moved some status message around
2019-04-24 04:28:46 +01:00
Fufu Fang
e2d2b0dd28
Cache system has been succesfully implemented
2019-04-24 04:28:27 +01:00
Fufu Fang
692ad3f00c
Cache dataset creation is working, time write the function to fill in the cache
2019-04-24 04:27:40 +01:00
Fufu Fang
b6bdf15ad1
removed a bunch of function prototypes
2019-04-24 04:27:38 +01:00
Fufu Fang
77bb715590
fixed memory leak in link table creation
2019-04-24 04:21:38 +01:00
Fufu Fang
5af3def3f8
Linked in CacheSystem_init, Cache_open, Cache_close
2019-04-24 04:21:38 +01:00
Fufu Fang
a02072f548
replaced fseek with fseeko, this should enable large file support
2019-04-24 04:21:38 +01:00
Fufu Fang
07b8382022
modified cache_create
2019-04-24 04:21:38 +01:00
Fufu Fang
212e319f20
unified struct member name between link.h and cache.h
2019-04-24 04:21:38 +01:00
Fufu Fang
c6717e0450
changed a bunch of function to static function
2019-04-24 04:21:38 +01:00
Fufu Fang
86644c0518
added more documentation
2019-04-24 04:21:38 +01:00
Fufu Fang
e9e41165ae
added CacheDir_create() and fs_release()
2019-04-24 04:21:38 +01:00
Fufu Fang
0c55dc5a0c
wrote Seg_exist, Seg_set, refined CacheSystem_init
2019-04-24 04:21:38 +01:00
Fufu Fang
e5c77f3680
Changed the way segments work, added more functions
...
Now segments are fixed size block of 128KiB
2019-04-24 04:21:38 +01:00
Fufu Fang
3d0269e90f
added Cache_create
2019-04-24 04:21:38 +01:00
Fufu Fang
4b60b4e9be
wrote the cache opening function
2019-04-24 04:21:38 +01:00
Fufu Fang
794fb9414f
wrote more Cache_open
2019-04-24 04:21:37 +01:00
Fufu Fang
7ae6d6fe1b
all the functions written so far compile fine, working on Cache_open
2019-04-24 04:21:37 +01:00
Fufu Fang
7cafdbf7d4
Completed metadata read/write functions
2019-04-24 04:21:37 +01:00
Fufu Fang
8d10316b95
changed the data type for file size. wrote Data_read()
2019-04-24 04:21:37 +01:00