Commit ceb0c2a3 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Drop MemUnionFs.Clear().

parent acc0d80c
......@@ -123,14 +123,6 @@ func (me *MemUnionFs) Reap() map[string]*Result {
return m
}
func (me *MemUnionFs) Clear() {
me.mutex.Lock()
defer me.mutex.Unlock()
me.deleted = make(map[string]bool)
me.root.clear("")
me.clearBackingStore()
}
func (me *MemUnionFs) clearBackingStore() {
f, err := os.Open(me.backingStore)
if err != nil {
......@@ -629,17 +621,6 @@ func (me *memNode) reap(path string, results map[string]*Result) {
}
}
func (me *memNode) clear(path string) {
me.original = path
me.changed = false
me.backing = ""
for n, ch := range me.Inode().FsChildren() {
p := filepath.Join(path, n)
mn := ch.FsNode().(*memNode)
mn.clear(p)
}
}
func (me *memNode) reset(path string) (entryNotify bool) {
for n, ch := range me.Inode().FsChildren() {
p := filepath.Join(path, n)
......
......@@ -798,7 +798,7 @@ func TestMemUnionGc(t *testing.T) {
writeToFile(wd+"/mnt/file2", "other-content")
err := os.Remove(wd + "/mnt/file1")
CheckSuccess(err)
ufs.Clear()
ufs.Reset()
entries, err := ioutil.ReadDir(wd + "/backing")
CheckSuccess(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment