1 Star 0 Fork 58

gnaygnil/docker

forked from src-openEuler/docker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0005-prjquota-fix-few-overlay2-quota-problems.patch 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
gnaygnil 提交于 2020-02-13 15:36 . docker: Fixed build error and URL
From b5e205b8d1ea0a62ea8847dc5510a10c65a2573e Mon Sep 17 00:00:00 2001
From: lujingxiao <lujingxiao@huawei.com>
Date: Sat, 19 Jan 2019 11:13:57 +0800
Subject: [PATCH 005/111] prjquota: fix few overlay2 quota problems
reason:fix few overlay2 quota problems
Change-Id: Id3a7915747c415d56684c291fb0498d04b762c8c
Signed-off-by: dengguangxing <dengguangxing@huawei.com>
Signed-off-by: zhangyu235 <zhangyu235@huawei.com>
Signed-off-by: lujingxiao <lujingxiao@huawei.com>
---
components/engine/daemon/graphdriver/overlay2/overlay.go | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/components/engine/daemon/graphdriver/overlay2/overlay.go b/components/engine/daemon/graphdriver/overlay2/overlay.go
index 36ae182bcd..96f44ba9a1 100644
--- a/components/engine/daemon/graphdriver/overlay2/overlay.go
+++ b/components/engine/daemon/graphdriver/overlay2/overlay.go
@@ -455,6 +455,14 @@ func (d *Driver) parseStorageOpt(storageOpt map[string]string, driver *Driver) e
if err != nil {
return err
}
+ // deal with negative and super large number
+ if size < 0 {
+ return fmt.Errorf("Illegal storage size(%s): numerical result out of range", val)
+ }
+ // for overlay (0-1024) means no limit
+ if size < 1024 && size > 0 {
+ return fmt.Errorf("Illegal storage size:%d, 1024 at least", size)
+ }
driver.options.quota.Size = uint64(size)
default:
return fmt.Errorf("Unknown option %s", key)
--
2.17.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gnaygnil/docker.git
git@gitee.com:gnaygnil/docker.git
gnaygnil
docker
docker
master

搜索帮助