[lxc-devel] [lxd/master] lxd/storage/quota: Build on older systems

2019-05-02 Thread joelhockey on Github
The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5720

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) ===
See #5659

Signed-off-by: Joel Hockey 
From 0e32aa23f9cd7349cb6c6fd04ce87970bff6b553 Mon Sep 17 00:00:00 2001
From: Joel Hockey 
Date: Thu, 2 May 2019 16:24:18 -0700
Subject: [PATCH] lxd/storage/quota: Build on older systems See #5659

Signed-off-by: Joel Hockey 
---
 lxd/storage/quota/projectquota.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lxd/storage/quota/projectquota.go 
b/lxd/storage/quota/projectquota.go
index 994921f753..37e4480665 100644
--- a/lxd/storage/quota/projectquota.go
+++ b/lxd/storage/quota/projectquota.go
@@ -14,6 +14,7 @@ import (
 /*
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [lxd/master] lxd/storage/quota: Build on older systems

2019-04-12 Thread stgraber on Github
The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/5660

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) ===
Closes #5658

Signed-off-by: Stéphane Graber 
From 44c7d5d8094483f83d3055332e9688ad00ee5a88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= 
Date: Fri, 12 Apr 2019 13:52:46 -0400
Subject: [PATCH] lxd/storage/quota: Build on older systems
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #5658

Signed-off-by: Stéphane Graber 
---
 lxd/storage/quota/projectquota.go | 42 +++
 1 file changed, 42 insertions(+)

diff --git a/lxd/storage/quota/projectquota.go 
b/lxd/storage/quota/projectquota.go
index bc47ca68c8..994921f753 100644
--- a/lxd/storage/quota/projectquota.go
+++ b/lxd/storage/quota/projectquota.go
@@ -21,6 +21,48 @@ import (
 #include 
 #include 
 
+#ifndef FS_XFLAG_PROJINHERIT
+struct fsxattr {
+   __u32   fsx_xflags;
+   __u32   fsx_extsize;
+   __u32   fsx_nextents;
+   __u32   fsx_projid;
+   unsigned char   fsx_pad[12];
+};
+
+struct if_dqinfo {
+   __u64 dqi_bgrace;
+   __u64 dqi_igrace;
+   __u32 dqi_flags;
+   __u32 dqi_valid;
+};
+
+struct if_dqblk {
+   __u64 dqb_bhardlimit;
+   __u64 dqb_bsoftlimit;
+   __u64 dqb_curspace;
+   __u64 dqb_ihardlimit;
+   __u64 dqb_isoftlimit;
+   __u64 dqb_curinodes;
+   __u64 dqb_btime;
+   __u64 dqb_itime;
+   __u32 dqb_valid;
+};
+#define FS_XFLAG_PROJINHERIT 0x0200
+#endif
+
+#ifndef FS_IOC_FSGETXATTR
+#define FS_IOC_FSGETXATTR _IOR ('X', 31, struct fsxattr)
+#endif
+
+#ifndef FS_IOC_FSSETXATTR
+#define FS_IOC_FSSETXATTR _IOW ('X', 32, struct fsxattr)
+#endif
+
+#ifndef PRJQUOTA
+#define PRJQUOTA 2
+#endif
+
 int quota_supported(char *dev_path) {
struct if_dqinfo dqinfo;
 
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel