Update btrfs driver to use snapshot storage

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2017-03-16 10:05:46 -07:00
parent 61b524aff2
commit 912746b016
No known key found for this signature in database
GPG key ID: F58C5D0A4405ACDB
7 changed files with 192 additions and 241 deletions

View file

@ -273,7 +273,7 @@ func (ms *boltMetastore) parents(bkt *bolt.Bucket, parent *Snapshot) (parents []
return
}
func (ms *boltMetastore) Remove(ctx context.Context, key string) (id string, err error) {
func (ms *boltMetastore) Remove(ctx context.Context, key string) (id string, k snapshot.Kind, err error) {
err = ms.withBucket(ctx, func(ctx context.Context, bkt *bolt.Bucket) error {
var ss Snapshot
b := bkt.Get([]byte(key))
@ -309,12 +309,10 @@ func (ms *boltMetastore) Remove(ctx context.Context, key string) (id string, err
}
id = fmt.Sprintf("%d", ss.ID)
k = fromProtoActive(ss.Active)
return nil
})
if err != nil {
return "", err
}
return
}