For large filesystems you can run past default resource limits causing
fsck to exit unhappily. Fix this by doing a getrlimit/setrlimit for RLIMIT_DATA. I made the same fix in NetBSD. Reviewed by: dg@root.com
This commit is contained in:
parent
f7dd354b1b
commit
3396608117
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40918
@ -42,12 +42,13 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: main.c,v 1.13 1998/03/08 09:55:26 julian Exp $";
|
||||
"$Id: main.c,v 1.14 1998/06/15 07:07:16 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ufs/ufsmount.h>
|
||||
@ -73,7 +74,12 @@ main(argc, argv)
|
||||
{
|
||||
int ch;
|
||||
int ret, maxrun = 0;
|
||||
struct rlimit rlim;
|
||||
|
||||
if (getrlimit(RLIMIT_DATA, &rlim) == 0) {
|
||||
rlim.rlim_cur = rlim.rlim_max;
|
||||
(void) setrlimit(RLIMIT_DATA, &rlim);
|
||||
}
|
||||
sync();
|
||||
while ((ch = getopt(argc, argv, "dfpnNyYb:c:l:m:")) != -1) {
|
||||
switch (ch) {
|
||||
|
@ -42,12 +42,13 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: main.c,v 1.13 1998/03/08 09:55:26 julian Exp $";
|
||||
"$Id: main.c,v 1.14 1998/06/15 07:07:16 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ufs/ufsmount.h>
|
||||
@ -73,7 +74,12 @@ main(argc, argv)
|
||||
{
|
||||
int ch;
|
||||
int ret, maxrun = 0;
|
||||
struct rlimit rlim;
|
||||
|
||||
if (getrlimit(RLIMIT_DATA, &rlim) == 0) {
|
||||
rlim.rlim_cur = rlim.rlim_max;
|
||||
(void) setrlimit(RLIMIT_DATA, &rlim);
|
||||
}
|
||||
sync();
|
||||
while ((ch = getopt(argc, argv, "dfpnNyYb:c:l:m:")) != -1) {
|
||||
switch (ch) {
|
||||
|
@ -42,12 +42,13 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: main.c,v 1.13 1998/03/08 09:55:26 julian Exp $";
|
||||
"$Id: main.c,v 1.14 1998/06/15 07:07:16 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ufs/ufsmount.h>
|
||||
@ -73,7 +74,12 @@ main(argc, argv)
|
||||
{
|
||||
int ch;
|
||||
int ret, maxrun = 0;
|
||||
struct rlimit rlim;
|
||||
|
||||
if (getrlimit(RLIMIT_DATA, &rlim) == 0) {
|
||||
rlim.rlim_cur = rlim.rlim_max;
|
||||
(void) setrlimit(RLIMIT_DATA, &rlim);
|
||||
}
|
||||
sync();
|
||||
while ((ch = getopt(argc, argv, "dfpnNyYb:c:l:m:")) != -1) {
|
||||
switch (ch) {
|
||||
|
Loading…
Reference in New Issue
Block a user