[rhel6-branch] Check for FBA DASDs so we don't try to format them with dasdfmt. (#1144979)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Tue Apr 21 13:21:21 UTC 2015
On Tue, Apr 21, 2015 at 08:25:22AM +0200, Vratislav Podzimek wrote:
> On Mon, 2015-04-20 at 21:27 -0400, Samantha N. Bueno wrote:
> > dasdfmt fails if you try to run it against an FBA DASD.
> >
> > Resolves: rhbz#1144979
> > ---
> > isys/dasd.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/isys/dasd.c b/isys/dasd.c
> > index 6d59742..259d9f8 100644
> > --- a/isys/dasd.c
> > +++ b/isys/dasd.c
> > @@ -92,6 +92,9 @@ int isLdlDasd(char *device) {
> > if (ret == 2)
> > return 0;
> >
> > + if (dasd_info.FBA_layout)
> > + return 0;
> > +
> > if (dasd_info.format == DASD_FORMAT_CDL) /* VOL1, CDL */
> > return 0;
> > else
> ACK.
Thanks! Unfortunately, jstodola tested out an updates.img I gave him and
found it didn't work. Some further digging into the DASD kernel code
revealed a bit of stupidity. It *should* be as easy as checking the
variable above, unfortunately even LDL DASDs are returning 1 for
dasd_info.FBA_layout, so the following patch actually fixes the issue:
diff --git a/isys/dasd.c b/isys/dasd.c
index 6d59742..337f1c7 100644
--- a/isys/dasd.c
+++ b/isys/dasd.c
@@ -92,6 +92,9 @@ int isLdlDasd(char *device) {
if (ret == 2)
return 0;
+ if (strncmp(dasd_info.type, "FBA", 3) == 0)
+ return 0;
+
if (dasd_info.format == DASD_FORMAT_CDL) /* VOL1, CDL */
return 0;
else
More information about the anaconda-patches
mailing list