[DRBD-user] Can not find the definition of struct net_conf

Philipp Reisner philipp.reisner at linbit.com
Fri Jul 25 10:42:13 CEST 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Am Freitag, 25. Juli 2008 10:24:24 schrieb niko:
> Help me,guys.I'm a kernel newbie.
>
> [root at niko drbd-8.2.6]# grep -ir "struct net_conf" .
> ./drbd/drbd_int.h:	struct net_conf *net_conf; /* protected by inc_net()
> and dec_net() */
> ./drbd/drbd_nl.c:	struct net_conf *new_conf = NULL;
> ./drbd/drbd_nl.c:	new_conf = kmalloc(sizeof(struct net_conf),
> GFP_KERNEL);
> ./drbd/drbd_nl.c:		memcpy(new_conf, mdev->net_conf, sizeof(struct
> net_conf));
> ./drbd/drbd_nl.c:		memset(new_conf, 0, sizeof(struct net_conf));
> ./drbd/drbd_nl.c:				    sizeof(struct net_conf_tag_len_struct) },
>

Hi Niko,

The structs we hold the configuration in are generated by the
macros in drbd/linux/drbd_tag_magic.h .

The readable definition of these is in 
drbd/linux/drbd_nl.h

That way it is ways easier to maintain this. Open coding it would lead
to lots of copy'n'paste errors...

-Phil
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria        http://www.linbit.com :



More information about the drbd-user mailing list