From ca38de33a7a31c7b96f7e920038b2fb6352160a8 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Mon, 24 Feb 2020 11:08:42 -0500
Subject: [PATCH] build: file-systems: Skip check for NFS file systems
* gnu/build/file-systems.scm (mount-file-system): Do not call
`check-file-system' when the file system is of NFS type.
---
gnu/build/file-systems.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -5,6 +5,7 @@
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 David C. Trudgian <dave@trudgian.net>
+;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -663,6 +664,7 @@ corresponds to the symbols listed in FLAGS."
(string-append "," options)
"")))))
(let* ((type (file-system-type fs))
+ (nfs? (string-prefix? "nfs" type))
(fs-options (file-system-options fs))
(options (if (null? fs-options)
#f
@@ -671,7 +673,7 @@ corresponds to the symbols listed in FLAGS."
(mount-point (string-append root "/"
(file-system-mount-point fs)))
(flags (mount-flags->bit-mask (file-system-flags fs))))
- (when (file-system-check? fs)
+ (when (and (file-system-check? fs) (not nfs?))
(check-file-system source type))
;; Create the mount point. Most of the time this is a directory, but
@@ -683,11 +685,9 @@ corresponds to the symbols listed in FLAGS."
(call-with-output-file mount-point (const #t)))
(mkdir-p mount-point))
- (cond
- ((string-prefix? "nfs" type)
- (mount-nfs source mount-point type flags options))
- (else
- (mount source mount-point type flags options)))
+ (if nfs?
+ (mount-nfs source mount-point type flags options)
+ (mount source mount-point type flags options))
;; For read-only bind mounts, an extra remount is needed, as per
;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0.
--
2.25.0