The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6070

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Use the provided unix.MS_LAZYTIME instead of defining the constant
ourselves.

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From 8aaa305d5491e5f72681acad4a4ea7ac38f7b4fb Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.h...@canonical.com>
Date: Tue, 13 Aug 2019 11:51:05 +0200
Subject: [PATCH] lxd: Use unix.MS_LAZYTIME

Use the provided unix.MS_LAZYTIME instead of defining the constant
ourselves.

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
---
 lxd/storage_cgo.go   | 4 ----
 lxd/storage_utils.go | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/lxd/storage_cgo.go b/lxd/storage_cgo.go
index 1f1c7136f7..a66edc27ef 100644
--- a/lxd/storage_cgo.go
+++ b/lxd/storage_cgo.go
@@ -260,10 +260,6 @@ import (
 // close.
 const LoFlagsAutoclear int = C.LO_FLAGS_AUTOCLEAR
 
-// MS_LAZYTIME retains inode timestamps in memory and updated them on-disk only
-// under certain conditions.
-const MS_LAZYTIME uintptr = C.MS_LAZYTIME
-
 // prepareLoopDev() detects and sets up a loop device for source. It returns an
 // open file descriptor to the free loop device and the path of the free loop
 // device. It's the callers responsibility to close the open file descriptor.
diff --git a/lxd/storage_utils.go b/lxd/storage_utils.go
index 108d4ccbd5..76daed4da1 100644
--- a/lxd/storage_utils.go
+++ b/lxd/storage_utils.go
@@ -35,7 +35,7 @@ var MountOptions = map[string]mountOptions{
        "diratime":      {false, unix.MS_NODIRATIME},
        "dirsync":       {true, unix.MS_DIRSYNC},
        "exec":          {false, unix.MS_NOEXEC},
-       "lazytime":      {true, MS_LAZYTIME},
+       "lazytime":      {true, unix.MS_LAZYTIME},
        "mand":          {true, unix.MS_MANDLOCK},
        "noatime":       {true, unix.MS_NOATIME},
        "nodev":         {true, unix.MS_NODEV},
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to