Do not report the filesystem as modified when the only change is to
update the timestamp in the superblock. Reported by: Peter Holm MFC after: 1 week
This commit is contained in:
parent
040b518474
commit
8a416970f9
@ -231,6 +231,7 @@ checkfilesys(char *filesys)
|
|||||||
struct group *grp;
|
struct group *grp;
|
||||||
struct iovec *iov;
|
struct iovec *iov;
|
||||||
char errmsg[255];
|
char errmsg[255];
|
||||||
|
int ofsmodified;
|
||||||
int iovlen;
|
int iovlen;
|
||||||
int cylno;
|
int cylno;
|
||||||
intmax_t blks, files;
|
intmax_t blks, files;
|
||||||
@ -425,10 +426,15 @@ checkfilesys(char *filesys)
|
|||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Write the superblock so we don't try to recover the
|
* Write the superblock so we don't try to recover the
|
||||||
* journal on another pass.
|
* journal on another pass. If this is the only change
|
||||||
|
* to the filesystem, we do not want it to be called
|
||||||
|
* out as modified.
|
||||||
*/
|
*/
|
||||||
sblock.fs_mtime = time(NULL);
|
sblock.fs_mtime = time(NULL);
|
||||||
sbdirty();
|
sbdirty();
|
||||||
|
ofsmodified = fsmodified;
|
||||||
|
flush(fswritefd, &sblk);
|
||||||
|
fsmodified = ofsmodified;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user