Re: another IDE cleanup: kill duplicated code

From: Andreas Dilger (adilger@turbolabs.com)
Date: Wed Feb 13 2002 - 11:24:35 EST


On Feb 13, 2002 13:35 +0100, Martin Dalecki wrote:
> Andreas Dilger wrote:
>
> >On Feb 12, 2002 16:23 +0100, Martin Dalecki wrote:
> >>>The first lv_read_ahead (in lv_t) removed. And references to it as well.
> >
> >... 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

Well, then you have no idea about how the current LVM code works. The
way it does everything is to read the data from disk, convert endianness
and such, and then pass it to the kernel via IOCTL. I have no comment
on whether this is a good or bad way to do it. The point is that the
struct marked "core" which you are deleting this unused field from is
filled in from user-space, so you can't just change it when you want.

Rather than spending a lot of time breaking the kernel/user interface
and forcing everyone using LVM to update their user tools, just leave
this field in the struct. Feel free to remove the actual code that
does the read-ahead if you want, but leave the lv_read_ahead field
in this struct alone. The entire LVM code is going to be replaced
by either LVM2 (just entered beta) or EVMS (in beta for a while now).

Cheers, Andreas

--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

- 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/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:56 EST