[stgt] [osd-dev] [PATCH 10/15 ver2] tgt: os.h: getnameinfo() is different on none-Linux systems
bharrosh at panasas.com
Wed Mar 11 15:33:01 CET 2009
FUJITA Tomonori wrote:
> On Tue, 03 Mar 2009 12:15:34 +0200
> Boaz Harrosh <bharrosh at panasas.com> wrote:
>>> blen = sizeof(buf);
>>> slen = sizeof(ss);
>>> - conn->tp->ep_getsockname(conn, (struct sockaddr *) &ss,
>>> - &slen);
>>> + ret = conn->tp->ep_getsockname(conn,
>>> + (struct sockaddr *) &ss, &slen);
>> TOMO if you are already experimenting, it might work if &slen is left
>> untouched and is passed as returned from getsockname to getnameinfo.
>> This might work on both Linux and BSD.
> Yes, that's the proper way to handle this issue.
>> But then we must make sure
>> that all transports set &slen to something good.
> All the transports must make sure that ep_getsockname should set slen
> because getsockname does for tcp. iser sets it up properly.
> So far looks like this patchset adds wrong workarounds instead doing
> the right things. Sigh, I have to investigate all the patchset in a
> line-by-line manner.
This is not fair. And is not the proper working procedure.
These problems existed before any BSD code. The BSD code did not add
anything to the mess.
If you want to fix the Linux code then it should be done separately,
by itself. In a different patchset. Which only fixes the Linux code.
This way if you have a regression you can go back to something that
worked before. Then if the Linux is fixed in a way compatible to BSD,
the compatibility layer can be removed by a latter patch.
Never MIX code changes with compatibility changes, because you cannot
separate the two if something goes wrong.
So what? Are you going to wait for all the Linux hacks and bugs fixed until
you put the BSD code? this is not the way to work!
Mean while I'm using my tree, and so will my users
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt