Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
call FITRIM in fstrimd, to unblock init and log the program name
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Dec 13, 2021
1 parent 973c41f commit e79d9ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frugalify.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,8 @@ static void do_fstrimd(const int fd)
struct timespec ts = {.tv_sec = FSTRIM_FREQ + 120};
sigset_t mask;

fstrim(fd);

if (prctl(PR_SET_NAME, "fstrimd") < 0)
return;

Expand Down Expand Up @@ -724,8 +726,6 @@ static void fstrimd(void)
if (fd < 0)
return;

fstrim(fd);

if (fork() == 0) {
openlog("fstrimd", 0, LOG_DAEMON);

Expand Down

0 comments on commit e79d9ba

Please sign in to comment.