initialization from my own repository
fix invalid pointer access to shared segment.

Also, add locking and copying shared data, for safety.
relax redundant shared access precautions

Shared access to the shared array of peer type names
was designed to be safe without locking or copying
because the peer type name array is append only,
i.e. no peer type names can be unregistered.

Unregistering introduces many other problems
(and not just the lock/copy avoided here),
such as need for "cache" invalidation among peers,
who had previously accessed the shared array.
fix invalid shared pointer access and wrong retval

also, lock and copy string from shared segment,
as a precaution.
relax shared segment access precautions

The shared array of peer type names is by design
append only, therefore no locking or copying strings
is needed to access it (only pointer conversions).
Append-only means that peer type names cannot be unregistered.

Unregistering is complicated because peers "cache"
the information they read from the shared array.
Add pthread to linked libraries
fix log_io printing beyond end-of-string garbage
fix buffer handling on incomplete/resubmitted reqs
Merge branch 'philfix'
initial commit of sosd
remove obsolete XSEG_{FLUSH,FUA}.
initialize lock in xq initialization.
Merge branch 'philfix'
remove close with negative file descriptor
make blockd loop over pending ios.
remove race condition on xseg_request state
Add (initial) support for X_INFO request operation

Add support for X_INFO request operation, to query information about a
target (X_INFO op support implemented in xseg-tool). Initial blockd
implementation 'returns' only the size of the target / file.
Make sure to unmap the segment in xseg_destroy()

Add xops->unmap() in xseg_destroy(). If you don't unmap the segment before
calling xops->deallocate(), xsegdev->callback and xsegdev->callarg are not set
to NULL when rmmoding xsegbd, and lead to an error (or kernel panic) when trying
to insmod xsegbd without rmmoding xsegdev and xseg.
Make xsegbd query peer for disk size(using X_INFO)

xsegbd will now send an X_INFO request to learn the size of the disk it's
mapping, instead of using the sector_size parameter at module load time.

Currently, xsegbd allocates its own segment, and thus it must wait until blockd
(or another peer with X_INFO support) joins the segment to get a response (this
will probably change soon).
Refactor cmd_info() code in xseg-tool.

Refactor cmd_info code in xseg-tool. Use cmd_wait to get the response.