* [Drbd-dev] Re: [DRBD-cvs] r1598 - trunk/user
[not found] <20041019073224.518E93BE6D@garcon.linbit.com>
@ 2004-10-19 9:13 ` Lars Marowsky-Bree
2004-10-19 10:19 ` Lars Ellenberg
0 siblings, 1 reply; 4+ messages in thread
From: Lars Marowsky-Bree @ 2004-10-19 9:13 UTC (permalink / raw)
To: drbd-dev
On 2004-10-19T09:32:24, svn@svn.drbd.org wrote:
> Author: phil
> Date: 2004-10-19 09:32:21 +0200 (Tue, 19 Oct 2004)
> New Revision: 1598
>
> Modified:
> trunk/user/Makefile
> trunk/user/drbdmeta.c
> Log:
> [patch by LGE]
> * removed the dependency on glib, and use the kernel's
> includes instead.
Do not do that. Please. Including kernel-headers from user-space is an
absolute nightmare, it keeps breaking sporadically and in particular on
non-i386 archs. The kernel headers just aren't meant to be used in
user-space (and are documented to not be supported for this), and all
the build issues I've had with OCFS, Lustre, ... have been caused by
this.
In particular these headers
> +#include <asm/byteorder.h> /* for the __cpu_to_le64 etc. functions */
> +#include <linux/bitops.h> /* for the hweight functions */
> +#include <linux/types.h> /* for the __u32/64 type defs */
_are known to break_ on ia64/ppc64/s390x. I'd be very grateful if you
could avoid this.
Sincerely,
Lars Marowsky-Brée <lmb@suse.de>
--
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX AG - A Novell company
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] Re: [DRBD-cvs] r1598 - trunk/user
2004-10-19 9:13 ` [Drbd-dev] Re: [DRBD-cvs] r1598 - trunk/user Lars Marowsky-Bree
@ 2004-10-19 10:19 ` Lars Ellenberg
2004-10-19 10:43 ` Lars Ellenberg
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ellenberg @ 2004-10-19 10:19 UTC (permalink / raw)
To: drbd-dev
/ 2004-10-19 11:13:07 +0200
\ Lars Marowsky-Bree:
> On 2004-10-19T09:32:24, svn@svn.drbd.org wrote:
>
> > Author: phil
> > Date: 2004-10-19 09:32:21 +0200 (Tue, 19 Oct 2004)
> > New Revision: 1598
> >
> > Modified:
> > trunk/user/Makefile
> > trunk/user/drbdmeta.c
> > Log:
> > [patch by LGE]
> > * removed the dependency on glib, and use the kernel's
> > includes instead.
>
> Do not do that. Please. Including kernel-headers from user-space is an
> absolute nightmare, it keeps breaking sporadically and in particular on
> non-i386 archs. The kernel headers just aren't meant to be used in
> user-space (and are documented to not be supported for this), and all
> the build issues I've had with OCFS, Lustre, ... have been caused by
> this.
>
> In particular these headers
>
> > +#include <asm/byteorder.h> /* for the __cpu_to_le64 etc. functions */
> > +#include <linux/bitops.h> /* for the hweight functions */
> > +#include <linux/types.h> /* for the __u32/64 type defs */
>
> _are known to break_ on ia64/ppc64/s390x. I'd be very grateful if you
> could avoid this.
hm.
I just don't want to depend on glib-devel just for some endianness issues.
rather copy waht is neccessary into our own headers.
which is not too much, anyways.
# linux/bitops.h
we only care for the hweight functions, which are plain c.
I don't see where they could break on any arch.
# linux/types.h
we only care for the __u32 __u64 type defines.
ok, we can drop that and just use sys/types.h,
%s/__u\(.*\)/uint\1_t/
# asm/byteorder.h
ok, we can drop that, and use utils.h instead.
we'd need to define *64 variants of swap and *_to_* functions, though.
konsensfähig?
lge
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] Re: [DRBD-cvs] r1598 - trunk/user
2004-10-19 10:19 ` Lars Ellenberg
@ 2004-10-19 10:43 ` Lars Ellenberg
2004-10-19 10:52 ` Philipp Reisner
0 siblings, 1 reply; 4+ messages in thread
From: Lars Ellenberg @ 2004-10-19 10:43 UTC (permalink / raw)
To: drbd-dev
/ 2004-10-19 12:19:18 +0200
\ Lars Ellenberg:
> > In particular these headers
> >
> > > +#include <asm/byteorder.h> /* for the __cpu_to_le64 etc. functions */
> > > +#include <linux/bitops.h> /* for the hweight functions */
> > > +#include <linux/types.h> /* for the __u32/64 type defs */
> >
> > _are known to break_ on ia64/ppc64/s390x. I'd be very grateful if you
> > could avoid this.
>
> hm.
>
> I just don't want to depend on glib-devel just for some endianness issues.
> rather copy waht is neccessary into our own headers.
> which is not too much, anyways.
>
> # linux/bitops.h
> we only care for the hweight functions, which are plain c.
> I don't see where they could break on any arch.
>
> # linux/types.h
> we only care for the __u32 __u64 type defines.
> ok, we can drop that and just use sys/types.h,
> %s/__u\(.*\)/uint\1_t/
>
> # asm/byteorder.h
> ok, we can drop that, and use utils.h instead.
nonsense.
that is a nonstandard header, too.
well, then I'd just copy_n_paste together our own endian header?
> konsensfähig?
lge
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] Re: [DRBD-cvs] r1598 - trunk/user
2004-10-19 10:43 ` Lars Ellenberg
@ 2004-10-19 10:52 ` Philipp Reisner
0 siblings, 0 replies; 4+ messages in thread
From: Philipp Reisner @ 2004-10-19 10:52 UTC (permalink / raw)
To: drbd-dev
> nonsense.
> that is a nonstandard header, too.
> well, then I'd just copy_n_paste together our own endian header?
>
good idea!
-Philipp
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria http://www.linbit.com :
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-10-19 10:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20041019073224.518E93BE6D@garcon.linbit.com>
2004-10-19 9:13 ` [Drbd-dev] Re: [DRBD-cvs] r1598 - trunk/user Lars Marowsky-Bree
2004-10-19 10:19 ` Lars Ellenberg
2004-10-19 10:43 ` Lars Ellenberg
2004-10-19 10:52 ` Philipp Reisner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.