-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: /etc/mtab will miss quota id #2675
Conversation
if set `/etc/mtab` before set rootfs quota, it will make /etc/mtab miss quota id of rootfs quota, so it need be moved after set rootfs quota. with overlay work dir, it disappear `work/work`, when only set the dir `work`'s quota id, if we remove set dir quota id by recursively, the quota id for overlay is invalid. Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2675 +/- ##
=========================================
+ Coverage 69.18% 69.2% +0.01%
=========================================
Files 285 285
Lines 18958 18959 +1
=========================================
+ Hits 13117 13120 +3
Misses 4371 4371
+ Partials 1470 1468 -2
|
@@ -231,6 +231,10 @@ func SetRootfsDiskQuota(basefs, size string, quotaID uint32) (uint32, error) { | |||
if err := SetDiskQuota(dir, size, quotaID); err != nil { | |||
return 0, errors.Wrapf(err, "failed to set dir(%s) disk quota", dir) | |||
} | |||
|
|||
if err := SetQuotaForDir(dir, quotaID); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this operate slow start time when lot of files locates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because of overlay Upper and Work have no files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
if set
/etc/mtab
before set rootfs quota, it will make /etc/mtab missquota id of rootfs quota, so it need be moved after set rootfs quota.
with overlay work dir, it disappear
work/work
, when only set the dirwork
's quota id, if we remove set dir quota id by recursively, thequota id for overlay is invalid.
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
I have no good idea
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
Signed-off-by: Rudy Zhang rudyflyzhang@gmail.com