On Tue, Jul 30, 2019 at 11:48:40AM -0400, Olga Kornievskaia wrote: > Ok I'd like argue for the code to stay as is because > 1. can't move the whole function into addr.c because it created a data > structure (nfs42_netaddr) that rpc knows nothing about > 2. While the nfs42_netaddr->addr is the output of the rpc_sock2uaddr() > but we still need the switch to populate the netid . Also since > rpc_sock2uaddr returns memory than the nfs42_netaddr data structure > needs to change to store pointers (and that's shared with the client). > Thus client and server would need to add other code to free the > created netaddr. > 3. this function as is can be used by the flexfile layout as well > (they also decided not to share code with rpc_sockaddr2uaddr but use > same content). that function also doesn't want the memory to be > allocated. > > Maybe I'm wrong about all of it and it all needs to be re-written to > take dynamic memory. But to use as is I don't want to call it and then > memcpy into existing static buffers and freeing what > rpc_sockaddr2uaddr has allocated. OK, that's fine. --b.