Skip to content
This repository has been archived by the owner on Jan 22, 2018. It is now read-only.

Commit

Permalink
add sync for new installs. Ticket #4523
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Buechler committed Jun 2, 2015
1 parent 6e05b5d commit a9cb05b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/backend/installer/fn_install.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ fn_install_os(struct i_fn_args *a)
for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
sp != NULL; sp = subpartition_next(sp)) {
if (strcmp(subpartition_get_mountpoint(sp), "/") == 0) {
command_add(cmds, "%s%s '/dev/%s\t\t%s\t\tufs\trw\t\t1\t1' >>%smnt/etc/fstab",
command_add(cmds, "%s%s '/dev/%s\t\t%s\t\tufs\trw,sync\t\t1\t1' >>%smnt/etc/fstab",
a->os_root, cmd_name(a, "ECHO"),
subpartition_get_device_name(sp),
subpartition_get_mountpoint(sp),
Expand All @@ -496,7 +496,7 @@ fn_install_os(struct i_fn_args *a)
mfsbacked_size,
a->os_root);
} else {
command_add(cmds, "%s%s '/dev/%s\t\t%s\t\tufs\trw\t\t2\t2' >>%smnt/etc/fstab",
command_add(cmds, "%s%s '/dev/%s\t\t%s\t\tufs\trw,sync\t\t2\t2' >>%smnt/etc/fstab",
a->os_root, cmd_name(a, "ECHO"),
subpartition_get_device_name(sp),
subpartition_get_mountpoint(sp),
Expand Down
8 changes: 4 additions & 4 deletions src/backend/lua/lib/installation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,11 @@ TargetSystem.new = function(tab)
}

if spd:get_mountpoint() == "/" then
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw\t\t1\t1' >>${root}${base}/${filename}")
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw,sync\t\t1\t1' >>${root}${base}/${filename}")
elseif spd:is_swap() then
cmds:add("${root}${ECHO} '/dev/${device}\t\tnone\t\tswap\tsw\t\t0\t0' >>${root}${base}/${filename}")
else
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw\t\t2\t2' >>${root}${base}/${filename}")
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw,sync\t\t2\t2' >>${root}${base}/${filename}")
end
end

Expand Down Expand Up @@ -601,11 +601,11 @@ TargetSystem.new = function(tab)
cmds:add("${root}${MKDIR} -p ${root}${base}${mtpt}")
end
fstype = "ufs"
opts = "rw"
opts = "rw,sync"
fstab[mtpt] = {
device = "/dev/" .. dev,
fstype = "ufs",
options = "rw",
options = "rw,sync",
dump = 2,
pass = 2
}
Expand Down
8 changes: 4 additions & 4 deletions src/backend/lua/lib/target_system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,11 @@ TargetSystem.new = function(tab)
}

if spd:get_mountpoint() == "/" then
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw\t\t1\t1' >>${root}${base}/${filename}")
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw,sync\t\t1\t1' >>${root}${base}/${filename}")
elseif spd:is_swap() then
cmds:add("${root}${ECHO} '/dev/${device}\t\tnone\t\tswap\tsw\t\t0\t0' >>${root}${base}/${filename}")
else
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw\t\t2\t2' >>${root}${base}/${filename}")
cmds:add("${root}${ECHO} '/dev/${device}\t\t${mountpoint}\t\tufs\trw,sync\t\t2\t2' >>${root}${base}/${filename}")
end
end

Expand Down Expand Up @@ -598,11 +598,11 @@ TargetSystem.new = function(tab)
cmds:add("${root}${MKDIR} -p ${root}${base}${mtpt}")
end
fstype = "ufs"
opts = "rw"
opts = "rw,sync"
fstab[mtpt] = {
device = "/dev/" .. dev,
fstype = "ufs",
options = "rw",
options = "rw,sync",
dump = 2,
pass = 2
}
Expand Down

0 comments on commit a9cb05b

Please sign in to comment.