Skip to content

Commit d96516e

Browse files
m-hilgendorfdeciduously
authored andcommitted
wip: mount fixes
1 parent 28d2151 commit d96516e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Diff for: packages/sandbox/src/linux/guest.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn create_mountpoint_if_not_exists(source: &CString, target: &mut CString) {
163163
match (*ptr.add(n), esc) {
164164
(SLASH, false) => {
165165
*ptr.add(n) = 0;
166-
libc::mkdir(target.as_ptr(), libc::O_RDWR as _);
166+
libc::mkdir(target.as_ptr(), 0o755);
167167
*ptr.add(n) = SLASH;
168168
},
169169
(BACKSLASH, false) => {
@@ -178,9 +178,9 @@ fn create_mountpoint_if_not_exists(source: &CString, target: &mut CString) {
178178
}
179179
}
180180
if is_dir {
181-
libc::mkdir(target.as_ptr(), libc::O_RDWR as _);
181+
libc::mkdir(target.as_ptr(), 0o755);
182182
} else {
183-
libc::creat(target.as_ptr(), libc::O_RDWR as _);
183+
libc::creat(target.as_ptr(), 0o777);
184184
}
185185
}
186186
}

Diff for: packages/server/src/runtime/linux.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ impl Runtime {
430430
upperdir,
431431
workdir,
432432
merged: mount.target.clone(),
433-
readonly: mount.readonly,
433+
readonly: false,
434434
});
435435
overlays.last_mut().unwrap()
436436
};
@@ -484,9 +484,12 @@ impl Runtime {
484484
.into(),
485485
);
486486
instance.mounts.push(
487-
sandbox::BindMount {
487+
sandbox::Mount {
488488
source: self.server.artifacts_path(),
489489
target: "/.tangram/artifacts".into(),
490+
fstype: None,
491+
flags: libc::MS_BIND | libc::MS_REC,
492+
data: None,
490493
readonly: false,
491494
}
492495
.into(),

Diff for: packages/vfs/src/fuse.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ where
616616
bavail: u64::MAX / 2,
617617
files: u64::MAX / 2,
618618
ffree: u64::MAX / 2,
619-
bsize: 0,
619+
bsize: 65536,
620620
namelen: u32::MAX,
621621
frsize: 1024,
622622
padding: 0,
@@ -649,7 +649,7 @@ where
649649
flags: request.getattr_flags,
650650
spare: [0; 2],
651651
stat: sys::fuse_statx {
652-
mask: 0,
652+
mask: 0xffff_ffff,
653653
ino: attr.attr.ino,
654654
size: attr.attr.size,
655655
blocks: attr.attr.blocks,

0 commit comments

Comments
 (0)