On 10/28/2013 6:50 PM, Phillip Susi wrote: > Why not? The kernel should have created it automatically when the > disk was first plugged in. Since you can't actually create partitions > on the disk, then what is parted doing to it?
Kernel identifies this kind of partition. As soon as disk label creation is done, the implicit partition is not known to kernel because of the remove partition and add partition can not happen. Remove partition called from arch/linux.c: _disk_sync_part_table() -> '_blkpg_remove_partition'. While trying to add partition 'disk.c: ped_disk_get_partition' called, it internally calls 'disk.c: ped_disk_next_partition', this function does not know about implicit partition so returns 'NULL'. Thought of 'disk.c: ped_disk_next_partition' change code to aware of this kind of partition. But backed my decision because I might break other disks. > It occurs to me that the answers to my questions could be that you > still need to use parted to create the dasd disk label and the > implicit partition does not include the disk label area, kind of like > the loop label. Is this the case? If so, then I think your patch is > going about it the wrong way. Instead of modifying arch/linux.c to be > hard coded to call BLKRRPRT, you should fix labels/dasd.c to create > this implicit partition which parted print would then properly show, > and linux.c should correctly inform the kernel of it with BLKPG. My last year patches to parted, added code in labels/dasd.c to take care of creating implicit partition. Due to the above mentioned reason needed BLKRRPRT. With the following patches & fixes, parted print shows the implicit partition. Introducing the support of EAV and EDEV devices. http://web.archiveorange.com/archive/v/UeqtKA5pFJY6CbWBM8Gg And some more fixes to them [1], http://lists.gnu.org/archive/html/bug-parted/2013-09/msg00009.html http://lists.gnu.org/archive/html/bug-parted/2013-09/msg00017.html http://lists.gnu.org/archive/html/bug-parted/2013-09/msg00011.html And the current patch. > In other words, parted print should correctly show this implicit > partition instead of showing no partitions, and having the implicit > partition shoved in by the kernel. > Sure, that sounds good. This sort of thing usually does something > like sleep for 0.1 seconds between attempts with a maximum of 20 > attempts to give 2 seconds. Ok. [1] I need to verify, whether the fix patches reached mainline or not. Regards R.Nageswara Sastry

