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

Issue 1594020: Replace "mount -o loop" with explict losetup use in build_image. (Closed)

Created:
10 years, 8 months ago by Bill Richardson
Modified:
9 years, 6 months ago
Reviewers:
adlr, sosa
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Replace "mount -o loop" with explict losetup use in build_image. This fixes the loop device leak. The problem is that inside the chroot, we have /etc/mtab as a symlink to /proc/mounts. That works most of the time, but if you mount something using "-o loop", it isn't cleaned up correctly when you umount it. To avoid that, we either have to replace the /etc/mtab symlink with an empty file when we create the chroot, or we have to make sure that we never execute a "mount -o loop" command from within the chroot. If we use an empty /etc/mtab file, the builds work fine, but then we can't see any mounted partitions that the host creates outside the chroot (such as USB keys), which causes other problems. Bleah.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -8 lines) Patch
M src/scripts/build_image View 4 chunks +22 lines, -8 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Bill Richardson
10 years, 8 months ago (2010-04-08 18:17:38 UTC) #1
adlr
LGTM w/ comment http://codereview.chromium.org/1594020/diff/1/2 File src/scripts/build_image (right): http://codereview.chromium.org/1594020/diff/1/2#newcode131 src/scripts/build_image:131: sleep 1 # me belong cargo ...
10 years, 8 months ago (2010-04-08 18:22:25 UTC) #2
Bill Richardson
10 years, 8 months ago (2010-04-08 18:23:47 UTC) #3
http://codereview.chromium.org/1594020/diff/1/2
File src/scripts/build_image (right):

http://codereview.chromium.org/1594020/diff/1/2#newcode131
src/scripts/build_image:131: sleep 1  # me belong cargo
On 2010/04/08 18:22:26, adlr wrote:
> write a better comment?

I *knew* you'd say something about this!

Powered by Google App Engine
This is Rietveld 408576698