diff options
author | smh <smh@FreeBSD.org> | 2013-07-03 23:46:30 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2013-07-03 23:46:30 +0000 |
commit | c0361090f3b06ca4a549ca5e3da0756d5bcb618a (patch) | |
tree | a5255845bddbd3e4613213622176280ce498e05b /sys/geom | |
parent | 44e6cbd7c84212bafefbeafe5c66cc38af64b7b6 (diff) | |
download | FreeBSD-src-c0361090f3b06ca4a549ca5e3da0756d5bcb618a.zip FreeBSD-src-c0361090f3b06ca4a549ca5e3da0756d5bcb618a.tar.gz |
Bump disk(9) ABI version to signify the addition of d_delmaxsize by r249940.
Ensure that d_delmaxsize is always set, removing init to 0 which could cause
future issues if use cases change.
Allow kern.cam.da.X.delete_max (which maps to d_delmaxsize) to be increased
up to the calculated max after being reduced.
MFC after: 1 day
X-MFC-With: r249940
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/geom_disk.c | 14 | ||||
-rw-r--r-- | sys/geom/geom_disk.h | 3 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index a9f7048..60cff73 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -148,14 +148,12 @@ g_disk_access(struct g_provider *pp, int r, int w, int e) dp->d_name, dp->d_unit); dp->d_maxsize = DFLTPHYS; } - if (dp->d_flags & DISKFLAG_CANDELETE) { - if (bootverbose && dp->d_delmaxsize == 0) { - printf("WARNING: Disk drive %s%d has no d_delmaxsize\n", - dp->d_name, dp->d_unit); - dp->d_delmaxsize = dp->d_maxsize; + if (dp->d_delmaxsize == 0) { + if (bootverbose && dp->d_flags & DISKFLAG_CANDELETE) { + printf("WARNING: Disk drive %s%d has no " + "d_delmaxsize\n", dp->d_name, dp->d_unit); } - } else { - dp->d_delmaxsize = 0; + dp->d_delmaxsize = dp->d_maxsize; } pp->stripeoffset = dp->d_stripeoffset; pp->stripesize = dp->d_stripesize; @@ -629,7 +627,7 @@ void disk_create(struct disk *dp, int version) { - if (version != DISK_VERSION_02) { + if (version != DISK_VERSION) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, " using incompatible ABI version of disk(9)\n"); diff --git a/sys/geom/geom_disk.h b/sys/geom/geom_disk.h index 05c5de3..852047b 100644 --- a/sys/geom/geom_disk.h +++ b/sys/geom/geom_disk.h @@ -120,7 +120,8 @@ int disk_resize(struct disk *dp, int flag); #define DISK_VERSION_00 0x58561059 #define DISK_VERSION_01 0x5856105a #define DISK_VERSION_02 0x5856105b -#define DISK_VERSION DISK_VERSION_02 +#define DISK_VERSION_03 0x5856105c +#define DISK_VERSION DISK_VERSION_03 #endif /* _KERNEL */ #endif /* _GEOM_GEOM_DISK_H_ */ |