updateBlockData overwrites the data for a single block.
(e sqlExecutor, inodeID uint64, block int, data []byte)
| 102 | |
| 103 | // updateBlockData overwrites the data for a single block. |
| 104 | func updateBlockData(e sqlExecutor, inodeID uint64, block int, data []byte) error { |
| 105 | const sql = `UPDATE fs_block SET data = ? WHERE (id, block) = (?, ?)` |
| 106 | if _, err := e.Exec(sql, data, inodeID, block); err != nil { |
| 107 | return err |
| 108 | } |
| 109 | return nil |
| 110 | } |
| 111 | |
| 112 | type blockInfo struct { |
| 113 | block int |