udev: synthesize "change' events for partitions when tools change the disk

This should make sure that fdisk-like programs will automatically
cause an update of all partitions, just like mkfs-like programs cause
an update of the partition.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
[PATCH] udev: try first re-reading the partition table

mounted partitions:
  # dd if=/dev/zero of=/dev/sda bs=1 count=1
  UDEV  [4157.369250] change   .../0:0:0:0/block/sda (block)
  UDEV  [4157.375059] change   .../0:0:0:0/block/sda/sda1 (block)
  UDEV  [4157.397088] change   .../0:0:0:0/block/sda/sda2 (block)
  UDEV  [4157.404842] change   .../0:0:0:0/block/sda/sda4 (block)

unmounted partitions:
  # dd if=/dev/zero of=/dev/sdb bs=1 count=1
  UDEV  [4163.450217] remove   .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)
  UDEV  [4163.593167] change   .../target6:0:0/6:0:0:0/block/sdb (block)
  UDEV  [4163.713982] add      .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udev: guard REREADP logic with open(O_ECXL)

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udev: make sure we always get "change" for the disk

The kernel will return 0 for REREADPT when no partition table
is found, we have to send out "change" ourselves.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
udev: guard REREADPT by exclusive lock instead of O_EXCL

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>