Merge "Only pass nomblk_io_submit option when mounting ext4"
This commit is contained in:
commit
c604ccfadd
1 changed files with 5 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ static void check_fs(char *blk_device, char *fs_type, char *target)
|
||||||
int status;
|
int status;
|
||||||
int ret;
|
int ret;
|
||||||
long tmpmnt_flags = MS_NOATIME | MS_NOEXEC | MS_NOSUID;
|
long tmpmnt_flags = MS_NOATIME | MS_NOEXEC | MS_NOSUID;
|
||||||
char *tmpmnt_opts = "nomblk_io_submit,errors=remount-ro";
|
char tmpmnt_opts[64] = "errors=remount-ro";
|
||||||
char *e2fsck_argv[] = {
|
char *e2fsck_argv[] = {
|
||||||
E2FSCK_BIN,
|
E2FSCK_BIN,
|
||||||
"-y",
|
"-y",
|
||||||
|
|
@ -118,6 +118,10 @@ static void check_fs(char *blk_device, char *fs_type, char *target)
|
||||||
* fix the filesystem.
|
* fix the filesystem.
|
||||||
*/
|
*/
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
if (!strcmp(fs_type, "ext4")) {
|
||||||
|
// This option is only valid with ext4
|
||||||
|
strlcat(tmpmnt_opts, ",nomblk_io_submit", sizeof(tmpmnt_opts));
|
||||||
|
}
|
||||||
ret = mount(blk_device, target, fs_type, tmpmnt_flags, tmpmnt_opts);
|
ret = mount(blk_device, target, fs_type, tmpmnt_flags, tmpmnt_opts);
|
||||||
INFO("%s(): mount(%s,%s,%s)=%d: %s\n",
|
INFO("%s(): mount(%s,%s,%s)=%d: %s\n",
|
||||||
__func__, blk_device, target, fs_type, ret, strerror(errno));
|
__func__, blk_device, target, fs_type, ret, strerror(errno));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue