From: Christoph Hellwig <hch@caldera.de>
To: Andreas Dilger <adilger@turbolabs.com>
Cc: linux-lvm@sistina.com
Subject: Re: [linux-lvm] A Caldera related bug?
Date: Thu, 30 Aug 2001 11:46:13 +0200 [thread overview]
Message-ID: <20010830114613.B12766@caldera.de> (raw)
In-Reply-To: <20010830032321.I541@turbolinux.com>; from adilger@turbolabs.com on Thu, Aug 30, 2001 at 03:23:21AM -0600
On Thu, Aug 30, 2001 at 03:23:21AM -0600, Andreas Dilger wrote:
> On Aug 30, 2001 09:08 +0200, Christoph Hellwig wrote:
> > This is because LVM is _completly_ broken by including kernel headers all
> > over theplace, and - even worse - sometimes even defining __KERNEL__ and
> > using kernel-only datatypes.
>
> Yes, it is going to be ugly when kdev_t is no longer == dev_t.
It's not only ugly, it's _broken_. This means the LVM ABI changes
because of a kernel-internal change.
>
> > --- LVM/1.0.1-rc1/kernel/lvm.h~ Thu Aug 30 09:00:30 2001
> > +++ LVM/1.0.1-rc1/kernel/lvm.h Thu Aug 30 09:02:47 2001
> > @@ -110,10 +110,7 @@
> > #include <linux/kdev_t.h>
> > #include <linux/list.h>
> > #else
> > -#define __KERNEL__
> > #include <linux/kdev_t.h>
> > -#include <linux/list.h>
> > -#undef __KERNEL__
> > #endif /* #ifndef __KERNEL__ */
>
> In this case, you may as well just remove the whole "#ifdef __KERNEL__"
> part of the header here.
It's not that easy. I still need linux/list.h in case of __KERNEL__.
Maybe the following is better:
#include <linux/kdev_t.h>
#ifdef __KERNEL__
# include <linux/list.h>
#endif
>
> > /* remap physical sector/rdev pairs including hash */
> > typedef struct lv_block_exception_v1 {
> > +#ifdef __KERNEL__
> > struct list_head hash;
> > +#else
> > + uint64_t hash; /* XXX b0rken on 64bit plattforms */
> > +#endif
>
> Maybe the non-kernel part can be considered as two void * pointers?
> I'm not sure if that will work on sparc64, if the kernel and user
> pointer sizes are not the same.
I could be made work with the current sparc ioctl translation layer.
I doubt anyone actually wants to do that with the ever-changing LVM
APIs.
> In the end, what is really needed is a well-defined LVM API between
> kernel and user-space that doesn't pass this kind of stuff.
Completly agreed.
Christoph
--
Of course it doesn't work. We've performed a software upgrade.
next prev parent reply other threads:[~2001-08-30 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-29 23:04 [linux-lvm] A Caldera related bug? dan_mcmanus
2001-08-30 7:08 ` Christoph Hellwig
2001-08-30 9:23 ` Andreas Dilger
2001-08-30 9:37 ` Patrick Caulfield
2001-08-30 9:46 ` Christoph Hellwig [this message]
2001-08-30 11:09 ` Joe Thornber
2001-08-30 12:16 ` Christoph Hellwig
2001-08-30 15:03 ` Joe Thornber
2001-08-30 16:11 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2001-08-30 16:38 dan_mcmanus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010830114613.B12766@caldera.de \
--to=hch@caldera.de \
--cc=adilger@turbolabs.com \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox