aboutsummaryrefslogtreecommitdiff
path: root/sbin/newfs/newfs.h
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2012-10-30 21:32:10 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2012-10-30 21:32:10 +0000
commit549f62fa42f1eebecc652fab209b94f897d0d791 (patch)
tree2c00e9d729a9009b78e4f58c7aab66de552d87a6 /sbin/newfs/newfs.h
parent913f53dc29f6a032dbbf316907e9f6366afb26b0 (diff)
downloadsrc-549f62fa42f1eebecc652fab209b94f897d0d791.tar.gz
src-549f62fa42f1eebecc652fab209b94f897d0d791.zip
Fix problem with geom_label(4) not recognizing UFS labels on filesystems
extended using growfs(8). The problem here is that geom_label checks if the filesystem size recorded in UFS superblock is equal to the provider (i.e. device) size. This check cannot be removed due to backward compatibility. On the other hand, in most cases growfs(8) cannot set fs_size in the superblock to match the provider size, because, differently from newfs(8), it cannot recompute cylinder group sizes. To fix this problem, add another superblock field, fs_providersize, used only for this purpose. The geom_label(4) will attach if either fs_size (filesystem created with newfs(8)) or fs_providersize (filesystem expanded using growfs(8)) matches the device size. PR: kern/165962 Reviewed by: mckusick Sponsored by: FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=242379
Diffstat (limited to 'sbin/newfs/newfs.h')
-rw-r--r--sbin/newfs/newfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/newfs/newfs.h b/sbin/newfs/newfs.h
index 25bfcc8f68fa..9e1da0db8924 100644
--- a/sbin/newfs/newfs.h
+++ b/sbin/newfs/newfs.h
@@ -88,6 +88,7 @@ extern int lflag; /* enable multilabel MAC for file system */
extern int nflag; /* do not create .snap directory */
extern int tflag; /* enable TRIM */
extern intmax_t fssize; /* file system size */
+extern off_t mediasize; /* device size */
extern int sectorsize; /* bytes/sector */
extern int realsectorsize; /* bytes/sector in hardware*/
extern int fsize; /* fragment size */