Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Issue 2152283003: Return correct disk free/available size when FS is mounted with size = 0 (Closed)

Created:
4 years, 5 months ago by Sriram
Modified:
4 years, 5 months ago
Reviewers:
Lei Zhang, reveman
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Return correct disk free/available size when FS is mounted with size = 0 When tmpfs is mounted with size = 0 (i.e. without any limit), then statvfs will return 0 for f_bfree, f_bavail, and f_blocks. Catch this case and return max_int64 instead. BUG=628710 Committed: https://crrev.com/6c917630660164bb28d57f31b970b38591c0b8b1 Cr-Commit-Position: refs/heads/master@{#406473}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Use GetFileSystemType to special case "f_block == 0" only for memory FS #

Total comments: 6

Patch Set 3 : Updated based on CR comments. #

Patch Set 4 : Format the file before submitting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -10 lines) Patch
M base/sys_info_posix.cc View 1 2 3 4 chunks +28 lines, -10 lines 0 comments Download

Messages

Total messages: 25 (10 generated)
Sriram
4 years, 5 months ago (2016-07-15 23:10:01 UTC) #4
Lei Zhang
https://codereview.chromium.org/2152283003/diff/1/base/sys_info_posix.cc File base/sys_info_posix.cc (right): https://codereview.chromium.org/2152283003/diff/1/base/sys_info_posix.cc#newcode83 base/sys_info_posix.cc:83: // f_blocks is 0 when tmpfs is mounted without ...
4 years, 5 months ago (2016-07-16 00:19:12 UTC) #5
Lei Zhang
https://codereview.chromium.org/2152283003/diff/1/base/sys_info_posix.cc File base/sys_info_posix.cc (right): https://codereview.chromium.org/2152283003/diff/1/base/sys_info_posix.cc#newcode83 base/sys_info_posix.cc:83: // f_blocks is 0 when tmpfs is mounted without ...
4 years, 5 months ago (2016-07-18 19:05:07 UTC) #8
Sriram
https://codereview.chromium.org/2152283003/diff/1/base/sys_info_posix.cc File base/sys_info_posix.cc (right): https://codereview.chromium.org/2152283003/diff/1/base/sys_info_posix.cc#newcode83 base/sys_info_posix.cc:83: // f_blocks is 0 when tmpfs is mounted without ...
4 years, 5 months ago (2016-07-19 23:41:32 UTC) #9
Lei Zhang
https://codereview.chromium.org/2152283003/diff/20001/base/sys_info_posix.cc File base/sys_info_posix.cc (right): https://codereview.chromium.org/2152283003/diff/20001/base/sys_info_posix.cc#newcode76 base/sys_info_posix.cc:76: } // namespace No, that's not what I meant. ...
4 years, 5 months ago (2016-07-19 23:45:10 UTC) #12
Sriram
https://codereview.chromium.org/2152283003/diff/20001/base/sys_info_posix.cc File base/sys_info_posix.cc (right): https://codereview.chromium.org/2152283003/diff/20001/base/sys_info_posix.cc#newcode76 base/sys_info_posix.cc:76: } // namespace On 2016/07/19 23:45:10, Lei Zhang wrote: ...
4 years, 5 months ago (2016-07-19 23:58:37 UTC) #13
Lei Zhang
lgtm, thanks for doing the homework. Can you do me one last favor and run ...
4 years, 5 months ago (2016-07-20 00:02:25 UTC) #14
Sriram
On 2016/07/20 00:02:25, Lei Zhang wrote: > lgtm, thanks for doing the homework. > > ...
4 years, 5 months ago (2016-07-20 00:06:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2152283003/60001
4 years, 5 months ago (2016-07-20 00:08:27 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-20 02:57:51 UTC) #19
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-20 02:58:01 UTC) #20
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/6c917630660164bb28d57f31b970b38591c0b8b1 Cr-Commit-Position: refs/heads/master@{#406473}
4 years, 5 months ago (2016-07-20 02:59:56 UTC) #22
phoglund_chromium
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2168843002/ by phoglund@chromium.org. ...
4 years, 5 months ago (2016-07-21 11:31:30 UTC) #23
Sriram
How can I reproduce the breakage? I tried doing an android build and it does ...
4 years, 5 months ago (2016-07-22 21:39:50 UTC) #24
Lei Zhang
4 years, 5 months ago (2016-07-22 21:43:01 UTC) #25
Message was sent while issue was closed.
On 2016/07/22 21:39:50, Sriram wrote:
> How can I reproduce the breakage? I tried doing an android build and it
> does not cause the build break (as it did not in CQ too).

See the discussion on https://codereview.chromium.org/2168843002/ which you
should have gotten emails for.

Powered by Google App Engine
This is Rietveld 408576698