summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2012-10-30 21:32:10 +0000
committertrasz <trasz@FreeBSD.org>2012-10-30 21:32:10 +0000
commitff5b37a93e45dfa350cd924478c25f32e87f922a (patch)
tree2c00e9d729a9009b78e4f58c7aab66de552d87a6 /sys/ufs
parent335b7a9f3cabbf193a9059af1bcc6c52bbe672af (diff)
downloadFreeBSD-src-ff5b37a93e45dfa350cd924478c25f32e87f922a.zip
FreeBSD-src-ff5b37a93e45dfa350cd924478c25f32e87f922a.tar.gz
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
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h
index 3715539..c992b1d 100644
--- a/sys/ufs/ffs/fs.h
+++ b/sys/ufs/ffs/fs.h
@@ -329,7 +329,8 @@ struct fs {
int32_t fs_old_cpc; /* cyl per cycle in postbl */
int32_t fs_maxbsize; /* maximum blocking factor permitted */
int64_t fs_unrefs; /* number of unreferenced inodes */
- int64_t fs_sparecon64[16]; /* old rotation block list head */
+ int64_t fs_providersize; /* size of underlying GEOM provider */
+ int64_t fs_sparecon64[15]; /* old rotation block list head */
int64_t fs_sblockloc; /* byte offset of standard superblock */
struct csum_total fs_cstotal; /* (u) cylinder summary information */
ufs_time_t fs_time; /* last time written */
OpenPOWER on IntegriCloud