Commit Graph

3 Commits

Author SHA1 Message Date
Dan Walsh 162e676330 Add read-only locks
We need to be able to acquire locks on storage areas which aren't
mounted read-write, which return errors when we attempt to open a file
in the mode where we can take write locks on them.  This patch adds a
read-only lock type for use in those cases.

A given file can be opened for read-locking or write-locking, but not
both.  Our Locker interface gains an IsReadWrite() method to let callers
tell the difference.

Based on patches by Dan Walsh <dwalsh@redhat.com>
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-06-12 10:40:39 -04:00
Dan Walsh b5adc948d1 Lockfile is leaking file descriptors, Needs to closexec
SELinux is complaining about the leaked file descriptors.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-06-06 15:21:01 -04:00
Dan Walsh 5531c8da65 Move storage/storage go objects to storage.
There is no reason for the extra directory level.

Also fixup some go lint issues
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-05-16 17:25:11 -04:00