Re: [PATCH 3/3] fdisk: dos: always write mbr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-11-14 at 10:43 +0100, Karel Zak wrote:
> On Wed, Nov 14, 2012 at 12:04:52AM -0800, Davidlohr Bueso wrote:
> > There's no harm when writing the MBR, changed or not. This also
> 

Sorry about the long delay, life has been crazy busy - trying to squeeze
in some util-linux time :-)

> it's harm -- kernel has to parse the new PT, udev has to scan all the
> stuff etc. ... many event and every event is painful if you have
> complicated setup (DM, multipath, udisks, ...).

good point.

> 
> > allows us to get rid of the 'MBRbuffer_changed' global variable.
> 
> It would be nice to add to fdisk_context
> 
>     void *labeldata;
> 
>  and define in fdiskdos.h
> 
>  struct fdisk_dosdata {
>     int write_status;             /* FDISKDOS_WRITE_* flags */
>     ...
>  }
> 
>  enum {
>     FDISKDOS_WRITE_HDR     = (1 << 1)  /* header buffer modified (e.g. ID change) */
>     FDISKDOS_WRITE_PT      = (1 << 2)  /* partition table modified */
>     FDISKDOS_WRITE_EPT     = (1 << 3)  /* any extended partition table modified */
>  };
> 
> (maybe you found better names for the macros and variables :-)
> 
> 
>  than we can add fdisk_is_modified() and is_modified() to fdisk_label
>  driver and remove all label specific junk from fdisk.c.

Yeah, a generic pointer to label-specific data is something that we have
to do. I will take a look at this option for a v2.

Thanks,
Davidlohr


--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux