diff options
author | mckusick <mckusick@FreeBSD.org> | 2015-04-24 23:27:50 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2015-04-24 23:27:50 +0000 |
commit | d1dcdd191e73e30bf95a8c2c51e5038fd81239ff (patch) | |
tree | ff3a5b0b7390ecb5dc73f15a7aadcba6ebdf8cb2 /sys/ufs/ufs | |
parent | 7752a9c31f86c14bf7ce603495b39a9dd930e2c5 (diff) | |
download | FreeBSD-src-d1dcdd191e73e30bf95a8c2c51e5038fd81239ff.zip FreeBSD-src-d1dcdd191e73e30bf95a8c2c51e5038fd81239ff.tar.gz |
Limit the number of cylinder groups that will be searched when
trying to build a cluster. The limit is tunable using the sysctl
vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups
per block allocation. It was previously limited to the number of
cylinder groups in the filesystem per block allocation. When there
were no clusters of the needed size left, it repeatedly searched
the whole filesystem for a non-existent cluster on every block
allocation. The result was very slow filesystem allocation with
100% CPU utilization. The old behavior can be had by setting
vfs.ffs.maxclustersearch to a huge number (1,000,000).
This change affects only the layout policy routines so is not able
to interfere with the integrity of the filesystem.
Reported by: Dmitry Sivachenko (demon@)
Tested by: Dmitry Sivachenko (demon@)
MFC after: 2 weeks
Diffstat (limited to 'sys/ufs/ufs')
-rw-r--r-- | sys/ufs/ufs/inode.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 37081d5..cd7c472 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -87,6 +87,8 @@ struct inode { daddr_t *snapblklist; /* Collect expunged snapshot blocks. */ } i_un; + int i_nextclustercg; /* last cg searched for cluster */ + /* * Data for extended attribute modification. */ |