[lxc-devel] [lxd/master] lxd: Use unix.MS_LAZYTIME

monstermunchkin on Github lxc-bot at linuxcontainers.org
Tue Aug 13 09:51:45 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 437 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190813/199f1cb3/attachment.bin>
-------------- next part --------------
From 8aaa305d5491e5f72681acad4a4ea7ac38f7b4fb Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at 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.hipp at 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},


More information about the lxc-devel mailing list