From d229821501d75fdb86424c3817aa6b7af8459afe Mon Sep 17 00:00:00 2001 From: Marc Tamsky Date: Fri, 5 Sep 2014 19:32:39 -0700 Subject: [PATCH] use tune2fs to disable ext4 mount counts and mount intervals Signed-off-by: Marc Tamsky (github: tamsky) --- daemon/graphdriver/devmapper/deviceset.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index 42315c6e82..a181f29dc9 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/daemon/graphdriver/devmapper/deviceset.go @@ -306,6 +306,10 @@ func (devices *DeviceSet) createFilesystem(info *DevInfo) error { if err != nil { err = exec.Command("mkfs.ext4", append([]string{"-E", "nodiscard,lazy_itable_init=0"}, args...)...).Run() } + if err != nil { + return err + } + err = exec.Command("tune2fs", append([]string{"-c", "-1", "-i", "0"}, devname)...).Run() default: err = fmt.Errorf("Unsupported filesystem type %s", devices.filesystem) }