Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Fixes the MSize comparison when negociating msize with server #28

Merged
merged 1 commit into from
Oct 4, 2016

Conversation

simonferquel
Copy link
Contributor

The msize negociation was wrong.
According to the man page http://plan9.bell-labs.com/magic/man2html/5/version, and Linux kernel 9pfs implementation http://git.kernel.org/cgit/linux/kernel/git/ericvh/v9fs.git/tree/net/9p/client.c#n980, the flow of version is:

  • client send its "HARD" max size
  • server compare it to its own "HARD" max size and respond with the minimum of the 2 values
    -> in the response the msize cannot be greater than the original client max size (if server has a greater value, it scales down to full fill the client constraint, if its lower, it tells to the client that it can't accept such a large msize value)
  • client and server agrees to scale down to the lowest "Hard" max size

@codecov-io
Copy link

Current coverage is 15.95% (diff: 0.00%)

Merging #28 into master will not change coverage

@@             master        #28   diff @@
==========================================
  Files            13         13          
  Lines          1128       1128          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            180        180          
  Misses          900        900          
  Partials         48         48          

Powered by Codecov. Last update 5a23906...b8387ce

@stevvooe
Copy link
Contributor

stevvooe commented Oct 4, 2016

LGTM

@stevvooe stevvooe merged commit f717cf6 into docker-archive:master Oct 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants