| 508 | } |
| 509 | |
| 510 | static void adjust_nfiles(int want_files) |
| 511 | { |
| 512 | struct rlimit rlim; |
| 513 | |
| 514 | if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) |
| 515 | return; |
| 516 | if (rlim.rlim_cur >= want_files) |
| 517 | return; |
| 518 | rlim.rlim_cur = want_files; |
| 519 | setrlimit(RLIMIT_NOFILE, &rlim); |
| 520 | } |
| 521 | |
| 522 | /* |
| 523 | * Register 8K of sparse files, update one at a random spot, then do some |