Messages in this thread | | | Date | Wed, 13 Feb 2002 13:35:37 +0100 | From | Martin Dalecki <> | Subject | Re: another IDE cleanup: kill duplicated code |
| |
Andreas Dilger wrote:
>On Feb 12, 2002 16:23 +0100, Martin Dalecki wrote: > >>>The later (lv_disk_t) struct isn't used anywhere in the kernel - >>>probably defined for userspace only? That's weird! And also many other >>>structs in lvm.h are nowhere to be found used. Guess we could swipe them >>>out as well. >>> >>>The first lv_read_ahead (in lv_t) removed. And references to it as well. >>> >>Yes I know the lvm coders where too deaf to separate user level >>structure layout properly from on disk and kernel space by using just >>different header files for different purposes. And then they tryed >>apparently to embarce anything they could think off, without really >>thinking hard about what should be there and what shouldn't. It was too >>hard for them to have a sneak view on for example Solaris to recognize >>what's really needed. >> > >>diff -ur linux-2.5.4/include/linux/lvm.h linux/include/linux/lvm.h >>--- linux-2.5.4/include/linux/lvm.h Mon Feb 11 02:50:08 2002 >>+++ linux/include/linux/lvm.h Tue Feb 12 15:52:45 2002 >>@@ -498,7 +498,6 @@ >> uint lv_badblock; /* for future use */ >> uint lv_allocation; >> uint lv_io_timeout; /* for future use */ >>- uint lv_read_ahead; >> >> /* delta to version 1 starts here */ >> struct lv_v5 *lv_snapshot_org; >> > >Yes, this is true, but since this struct is passed between the kernel >and user space you can't just delete it, or everyone using LVM has a >broken system and may not even be able to boot if they have root on >LVM. Feel free to delete the code which actually uses this field, but >don't remove it from the struct unless you are willing to fix the user >space code also. > Please note that there are two structs there: One of them is tagged /* core */ and another of them is tagged as beeing /* disk */. The driver does only touch the core version, which is supposedly only to be used by the driver itself. This is what I was complaining about in first place: Why is the driver's internal struct exposed there at all
All right?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |