Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Release 0.9.1
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lucas <xavier.lucas@corp.ovh.com>
  • Loading branch information
Xavier Lucas committed Jan 31, 2017
1 parent 5a85df1 commit e45e86c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
13 changes: 2 additions & 11 deletions docs/RELEASE.md
Expand Up @@ -2,14 +2,5 @@

### IMPROVEMENTS :

- [#102] Directory times are now set to the filesystem mount time.
- [#101] Application panic events are pushed to syslog.
- Option extra_attr renamed to attr.

### FEATURE :

- [#103] New option : xattr can now be used to handle extended attributes on files.

### BUGFIX :

- [#105] fsync(2) calls are now handled as a no-op.
- Auto detect uid and gid based on the current user.
- Allow redirecting stdout and stderr.
9 changes: 9 additions & 0 deletions svfs/cache.go
Expand Up @@ -212,6 +212,7 @@ func (c *Cache) Set(container, path, name string, node Node) {
// only relying on a hashmap with basic functions.
type SimpleCache struct {
changes map[string]Node
mutex sync.Mutex
}

// NewSimpleCache creates a new simplistic cache.
Expand All @@ -227,20 +228,28 @@ func (c *SimpleCache) key(container, path string) string {

// Add pushes a new cache entry.
func (c *SimpleCache) Add(container, path string, node Node) {
c.mutex.Lock()
defer c.mutex.Unlock()
c.changes[c.key(container, path)] = node
}

// Exist checks whether a cache key exist or not.
func (c *SimpleCache) Exist(container, path string) bool {
c.mutex.Lock()
defer c.mutex.Unlock()
return c.changes[c.key(container, path)] != nil
}

// Get retrieves a cache entry for the given key.
func (c *SimpleCache) Get(container, path string) Node {
c.mutex.Lock()
defer c.mutex.Unlock()
return c.changes[c.key(container, path)]
}

// Remove pops the cache entry at this key.
func (c *SimpleCache) Remove(container, path string) {
c.mutex.Lock()
defer c.mutex.Unlock()
delete(c.changes, c.key(container, path))
}
6 changes: 5 additions & 1 deletion svfs/swift.go
Expand Up @@ -35,7 +35,11 @@ func initSegment(c, prefix string, id *uint, t *swift.Object, d []byte, up *uint
}

func createContainer(name string) (*swift.Container, error) {
err := SwiftConnection.ContainerCreate(name, nil)
headers := make(map[string]string)
if StoragePolicy != "" {
headers[storagePolicyHeader] = StoragePolicy
}
err := SwiftConnection.ContainerCreate(name, headers)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion svfs/version.go
@@ -1,4 +1,4 @@
package svfs

// Version is the current SVFS version
const Version = "0.9.0"
const Version = "0.9.1"

0 comments on commit e45e86c

Please sign in to comment.