You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type Disk interface {
Read(a uint64) (Block, error)
ReadTo(a uint64, b Block) error
Write(a uint64, v Block) error
Size() (uint64, error)
Barrier() error
Close() error
}
the Disk can be mem fs, file fs, or network fs (ths fs implement the Disk interface with smb client)
2: batch read & write to resuse IO
the io is very intensive when WRITE a big file
writing a data, it will make 4 write operates
1 write log block(journal data)
2 update block0(disk addrs)
3 update block1(start pos),
4 write data back.
if writing a big data consecutively, Batch interfaces can be used to reduce IO in the setp 1 and 4
if reading a big data consecutiveley, It's the same with writing
the interface about like this.
hi
go-journal is very good
I have two suggestions
1: the disk function maybe need a error return
orignal Disk interface
the Disk can be mem fs, file fs, or network fs (ths fs implement the Disk interface with smb client)
2: batch read & write to resuse IO
the io is very intensive when WRITE a big file
writing a data, it will make 4 write operates
if writing a big data consecutively, Batch interfaces can be used to reduce IO in the setp 1 and 4
if reading a big data consecutiveley, It's the same with writing
the interface about like this.
could you add a batch WRITE api, or give me some advice
thank you
The text was updated successfully, but these errors were encountered: