Hans de Goede wrote: > dasd_write(), was reading the volume label from the disk (trough > fdasd_check_volume()) and later writing it back again, this is fine for > existing dasd labels, but when creating a fresh label, this would > also cause the old volume label to be re-used, and if the old label > was corrupt, it would cause fdasd_check_volume() and thus dasd_write() > to fail. > > * libparted/arch/linux.c (toplevel): include fdasd.h. > (init_dasd): Do BIODASDINFO ioctl, and store the dasd devno in > arch_specific. > (init_dasd): Remove dead (never reached) code. > * libparted/arch/linux.h (struct _LinuxSpecific): Add devno member. > * libparted/labels/dasd.c (DasdDiskSpecific): add vlabel member. > (dasd_alloc): Init DasdDiskSpecific.vlabel for fresh disks > (dasd_read): Store read vlabel in DasdDiskSpecific.vlabel. > (dasd_write): Write DasdDiskSpecific.vlabel instead of on disk vlabel.
Thanks! I'll do a thorough review tomorrow, but in the mean time, would you please write a sentence about this in NEWS? Also, I want to be able to exercise this fix. Assuming I have an s390 VM, I suppose I could create a dasd partition table from a dd-created file full of zeros, corrupt part of it, and then what? Create another on top of that? Is it the mklabel that fails? Can you give enough detail so I can write a reproducer? _______________________________________________ bug-parted mailing list bug-parted@gnu.org http://lists.gnu.org/mailman/listinfo/bug-parted