summaryrefslogtreecommitdiffstats
path: root/sbin/tunefs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2010-04-30 04:21:22 +0000
committerjeff <jeff@FreeBSD.org>2010-04-30 04:21:22 +0000
commitae5c8abad9e011d84fbe6f903242c206fb4d5e5d (patch)
tree8d10ec0926d20b4e2373e81ef5b4301252e31272 /sbin/tunefs
parent1b686893cdbadb33e1155983d5c48f4ec91e6cd1 (diff)
downloadFreeBSD-src-ae5c8abad9e011d84fbe6f903242c206fb4d5e5d.zip
FreeBSD-src-ae5c8abad9e011d84fbe6f903242c206fb4d5e5d.tar.gz
- Use the path to the filesystem mountpoint to look up the statfs
structure so that we correctly reload. Note that tunefs doesn't properly detect the need to reload if the disk device is specified for a read-only mounted filesystem. - Lessen the contiguity requirement for the journal so that it is more likely to succeed.
Diffstat (limited to 'sbin/tunefs')
-rw-r--r--sbin/tunefs/tunefs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
index a10b35d..7987620 100644
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -280,9 +280,9 @@ main(int argc, char *argv[])
if (ufs_disk_fillout(&disk, special) == -1)
goto err;
if (disk.d_name != special) {
- special = disk.d_name;
- if (statfs(special, &stfs) == 0 &&
- strcmp(special, stfs.f_mntonname) == 0)
+ if (statfs(special, &stfs) != 0)
+ warn("Can't stat %s", special);
+ if (strcmp(special, stfs.f_mntonname) == 0)
active = 1;
}
@@ -546,7 +546,7 @@ journal_balloc(void)
* Try to minimize fragmentation by requiring a minimum
* number of blocks present.
*/
- if (cgp->cg_cs.cs_nbfree > blocks / 8)
+ if (cgp->cg_cs.cs_nbfree > 128 * 1024 * 1024)
break;
if (contig == 0 && cgp->cg_cs.cs_nbfree)
break;
OpenPOWER on IntegriCloud