Skip to content

Commit

Permalink
Merged in bugfix/BSR-747 (pull request #422)
Browse files Browse the repository at this point in the history
BSR-747 filesystem check only when fast sync setting
  • Loading branch information
choisa authored and sungeun-kim committed Apr 6, 2021
2 parents 93a7207 + ae1181a commit 6d5ea15
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bsr-utils/user/v9/bsrsetup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,20 @@ static int need_filesystem_recovery(char * dev_name)
char cmd[256];
char fs_type[10];
int ret = 0;
int fast_sync = 0;
FILE *fp;

// check fast sync settings
fp = fopen("/etc/bsr.d/.use_fast_sync", "r");

if (fp) {
ret = fscanf(fp, "%d", &fast_sync);
fclose(fp);

// if full sync, skip filesystem check
if (ret == 1 && !fast_sync)
return 0;
}
memset(cmd, 0, sizeof(cmd));
sprintf(cmd, "blkid -o value -s TYPE %s", dev_name);

Expand Down

0 comments on commit 6d5ea15

Please sign in to comment.