Re: [PATCH 07/14] DRBD: internal_data_structures

From: Bart Van Assche
Date: Sat Apr 11 2009 - 03:19:36 EST


> +static inline void drbd_kobject_uevent(struct drbd_conf *mdev)
> +{
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10)
> +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
> +       kobject_uevent(disk_to_kobj(mdev->vdisk), KOBJ_CHANGE, NULL);
> +#else
> +       kobject_uevent(disk_to_kobj(mdev->vdisk), KOBJ_CHANGE);
> +       /* rhel4 / sles9 and older don't have this at all,
> +        * which means user space (udev) won't get events about possible changes of
> +        * corresponding resource + disk names after the initial drbd minor creation.
> +        */
> +#endif
> +#endif
> +}

There exist scripts which accept a kernel patch and a kernel version
and remove all code that does not apply to the specified kernel
version. Maybe it's a good idea to run the DRBD code through such a
script before posting it for review.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/