@@ -14,75 +14,3 @@ type Block = disk.Block
14
14
const BlockSize uint64 = disk .BlockSize
15
15
16
16
type Disk = disk.Disk
17
-
18
- /*
19
- // Disk provides access to a logical block-based disk
20
- type Disk interface {
21
- // Read reads a disk block by address
22
- //
23
- // Expects a < Size().
24
- Read(a uint64) Block
25
-
26
- // ReadTo reads the disk block at a and stores the result in b
27
- //
28
- // Expects a < Size().
29
- ReadTo(a uint64, b Block)
30
-
31
- // Write updates a disk block by address
32
- //
33
- // Expects a < Size().
34
- Write(a uint64, v Block)
35
-
36
- // Size reports how big the disk is, in blocks
37
- Size() uint64
38
-
39
- // Barrier ensures data is persisted.
40
- //
41
- // When it returns, all outstanding writes are guaranteed to be durably on
42
- // disk
43
- Barrier()
44
-
45
- // Close releases any resources used by the disk and makes it unusable.
46
- Close()
47
- }
48
-
49
- var implicitDisk Disk
50
-
51
- // Init sets up the global disk
52
- func Init(d Disk) {
53
- implicitDisk = d
54
- }
55
-
56
- // Get returns the previously-initialized global disk
57
- func Get() Disk {
58
- return implicitDisk
59
- }
60
-
61
- // Read (see the Disk documentation)
62
- //
63
- // Deprecated: use Get() and the Disk method
64
- func Read(a uint64) Block {
65
- return implicitDisk.Read(a)
66
- }
67
-
68
- // Write (see the Disk documentation)
69
- //
70
- // Deprecated: use Get() and the Disk method
71
- func Write(a uint64, v Block) {
72
- implicitDisk.Write(a, v)
73
- }
74
-
75
- // Size (see the Disk documentation)
76
- //
77
- // Deprecated: use Get() and the Disk method
78
- func Size() uint64 {
79
- return implicitDisk.Size()
80
- }
81
-
82
- // Barrier (see the Disk documentation)
83
- //
84
- // Deprecated: use Get() and the Disk method
85
- func Barrier() {
86
- implicitDisk.Barrier()
87
- }
88
- */
0 commit comments