naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
923a60
From 1ab30e0ea4b78ea20e64dccf729668d18a0fac51 Mon Sep 17 00:00:00 2001
923a60
From: Lukas Nykryn <lnykryn@redhat.com>
923a60
Date: Mon, 30 Mar 2015 14:42:02 +0200
923a60
Subject: [PATCH] mount: don't run quotaon only for network filesystems
923a60
923a60
If you have for example ext4 on iscsi devices it is possible to setup
923a60
qoutas there. Unfortunately, because such fstab entry contains _netdev,
923a60
systemd will not add dependency to quotaon.service.
923a60
923a60
(cherry picked from commit 11041c8488e956924870379a9203d7f1cac3b038)
923a60
923a60
Cherry-picked from: f66964d
923a60
Resolves: #1222517
923a60
---
923a60
 src/core/mount.c | 4 +++-
923a60
 1 file changed, 3 insertions(+), 1 deletion(-)
923a60
923a60
diff --git a/src/core/mount.c b/src/core/mount.c
923a60
index 3ae0eb4621..3359220251 100644
923a60
--- a/src/core/mount.c
923a60
+++ b/src/core/mount.c
923a60
@@ -107,7 +107,9 @@ static bool mount_is_auto(const MountParameters *p) {
923a60
 static bool needs_quota(const MountParameters *p) {
923a60
         assert(p);
923a60
 
923a60
-        if (mount_is_network(p))
923a60
+        /* Quotas are not enabled on network filesystems,
923a60
+         * but we them, for example, on storages connected via iscsi */
923a60
+        if (p->fstype && fstype_is_network(p->fstype))
923a60
                 return false;
923a60
 
923a60
         if (mount_is_bind(p))