archipelago
12 years agoremove signal manipulation code
Giannakos Filippos [Wed, 22 Feb 2012 17:16:09 +0000 (19:16 +0200)]
remove signal manipulation code

12 years agoRemove traling whitespace in vlmc_shared
Stratos Psomadakis [Wed, 22 Feb 2012 14:42:00 +0000 (16:42 +0200)]
Remove traling whitespace in vlmc_shared

12 years agovlmc: Minor fix for prev commit
Stratos Psomadakis [Wed, 22 Feb 2012 14:36:41 +0000 (16:36 +0200)]
vlmc: Minor fix for prev commit

12 years agovlmc: Split common funcs to a separate file
Stratos Psomadakis [Wed, 22 Feb 2012 14:33:03 +0000 (16:33 +0200)]
vlmc: Split common funcs to a separate file

12 years agotools: Add configurable NR_OPS for blockd/filed
Stratos Psomadakis [Wed, 22 Feb 2012 14:13:05 +0000 (16:13 +0200)]
tools: Add configurable NR_OPS for blockd/filed

12 years agoblockd: Optionally log pending_io()
Stratos Psomadakis [Wed, 22 Feb 2012 13:54:30 +0000 (15:54 +0200)]
blockd: Optionally log pending_io()

12 years agoYet another typo
Stratos Psomadakis [Tue, 21 Feb 2012 09:07:30 +0000 (11:07 +0200)]
Yet another typo

12 years agovlmc-tool: Fix typo of prev commit
Stratos Psomadakis [Tue, 21 Feb 2012 09:05:43 +0000 (11:05 +0200)]
vlmc-tool: Fix typo of prev commit

12 years agovlmc-tool: Don't use hardcoded reqs number
Stratos Psomadakis [Tue, 21 Feb 2012 09:03:44 +0000 (11:03 +0200)]
vlmc-tool: Don't use hardcoded reqs number

12 years agoEnable optional request logging for blockd/filed
Stratos Psomadakis [Mon, 20 Feb 2012 14:36:37 +0000 (16:36 +0200)]
Enable optional request logging for blockd/filed

12 years agoUse correct sysfs attr (srcport) when mapping
Stratos Psomadakis [Mon, 20 Feb 2012 14:03:15 +0000 (16:03 +0200)]
Use correct sysfs attr (srcport) when mapping

12 years agoblockd: Make request logging optional
Stratos Psomadakis [Mon, 20 Feb 2012 12:17:40 +0000 (14:17 +0200)]
blockd: Make request logging optional

12 years agoblockd: Fix cli option/argument for nr_ops
Stratos Psomadakis [Mon, 20 Feb 2012 12:08:31 +0000 (14:08 +0200)]
blockd: Fix cli option/argument for nr_ops

12 years agoMinor fix for vlmc/xseg-setup
Stratos Psomadakis [Mon, 20 Feb 2012 10:57:34 +0000 (12:57 +0200)]
Minor fix for vlmc/xseg-setup

12 years agoFix vlmc-filed.py free port scanning
Stratos Psomadakis [Mon, 20 Feb 2012 10:36:27 +0000 (12:36 +0200)]
Fix vlmc-filed.py free port scanning

12 years agoFixes for vlmc-filed
Stratos Psomadakis [Mon, 20 Feb 2012 00:23:38 +0000 (02:23 +0200)]
Fixes for vlmc-filed

12 years agoAdd support for filed in the vlmc tool
Stratos Psomadakis [Sun, 19 Feb 2012 23:34:33 +0000 (01:34 +0200)]
Add support for filed in the vlmc tool

12 years agoMerge remote-tracking branch 'origin/xseg' into merger
Stratos Psomadakis [Sun, 19 Feb 2012 22:49:02 +0000 (00:49 +0200)]
Merge remote-tracking branch 'origin/xseg' into merger

Conflicts:
xseg/tools/vlmc.py
xseg/tools/xseg_setup.sh

Conflicts Resolution:
vlmc.py:
* Keep the \t -> space changes from the xseg branch
* Keep the new parsing scheme from the tools
xseg_setup.sh:
* Keep the change to sourcing the helpers.sh from
  the tools branch

12 years agoxsegbd/xsegdev: Fix xsegbd/xsegdev memory leak
Stratos Psomadakis [Sun, 19 Feb 2012 21:09:25 +0000 (23:09 +0200)]
xsegbd/xsegdev: Fix xsegbd/xsegdev memory leak

xsegdev_get/put and the associated xsegdev->userfield struct member
were incorrectly used, resulting in a memory leak, where xsegdev
segment wasn't (v)freed at xsegdev unload.

Refs #3

12 years agoRemove incorrect comment
Vangelis Koukis [Sun, 19 Feb 2012 20:55:40 +0000 (22:55 +0200)]
Remove incorrect comment

12 years agoIntroduce various fixes, run end-to-end
Vangelis Koukis [Sun, 19 Feb 2012 20:42:15 +0000 (22:42 +0200)]
Introduce various fixes, run end-to-end

Introduce various fixes, some aesthetic, to make
the infrastructure run end-to-end, xsegbd-to-filed
after merging of the filed and tools branches.

12 years agoInitial support for config parsing for vlmc-tool
Stratos Psomadakis [Sun, 19 Feb 2012 16:12:25 +0000 (18:12 +0200)]
Initial support for config parsing for vlmc-tool

12 years agoMinor parsing fixes for vlmc tool
Stratos Psomadakis [Sun, 19 Feb 2012 15:15:54 +0000 (17:15 +0200)]
Minor parsing fixes for vlmc tool

12 years agoMinor fixes for helpers
Stratos Psomadakis [Sun, 19 Feb 2012 15:11:18 +0000 (17:11 +0200)]
Minor fixes for helpers

12 years agoFixes for the vlmc-tool
Stratos Psomadakis [Sun, 19 Feb 2012 15:05:20 +0000 (17:05 +0200)]
Fixes for the vlmc-tool
 * Change the parsing to be compatible with ganeti rbd calls
 * Force python2.7 (needed by subprocess module)

12 years agoMore fixes for helper scripts
Stratos Psomadakis [Sun, 19 Feb 2012 15:04:49 +0000 (17:04 +0200)]
More fixes for helper scripts

12 years agoFix two instances of XS_ERROR
Vangelis Koukis [Sun, 19 Feb 2012 12:11:02 +0000 (14:11 +0200)]
Fix two instances of XS_ERROR

12 years agoMerge branch 'tools' into xseg
Vangelis Koukis [Sun, 19 Feb 2012 12:01:58 +0000 (14:01 +0200)]
Merge branch 'tools' into xseg

Conflicts:
xseg/xq/xq.c

12 years agoMerge branch 'filed' into xseg
Vangelis Koukis [Sun, 19 Feb 2012 11:51:14 +0000 (13:51 +0200)]
Merge branch 'filed' into xseg

12 years agoXS_ERROR renamed to XS_FAILED
Georgios D. Tsoukalas [Sat, 18 Feb 2012 16:52:40 +0000 (18:52 +0200)]
XS_ERROR renamed to XS_FAILED

12 years agoportable and future-proof locks
gtsouk [Sat, 18 Feb 2012 16:35:29 +0000 (18:35 +0200)]
portable and future-proof locks

12 years agorelative pointers
gtsouk [Sat, 18 Feb 2012 16:34:35 +0000 (18:34 +0200)]
relative pointers

12 years agorelative pointer doubly linked lists
gtsouk [Sat, 18 Feb 2012 16:24:29 +0000 (18:24 +0200)]
relative pointer doubly linked lists

12 years agoCorrect the tests for unset config variables
Stratos Psomadakis [Fri, 17 Feb 2012 19:35:14 +0000 (21:35 +0200)]
Correct the tests for unset config variables

12 years agoHelper scripts to setup and test xsge components
Stratos Psomadakis [Fri, 17 Feb 2012 15:42:45 +0000 (17:42 +0200)]
Helper scripts to setup and test xsge components

12 years agoInitial commit for the (blockd-specific) vlmc tool
Stratos Psomadakis [Fri, 17 Feb 2012 15:41:29 +0000 (17:41 +0200)]
Initial commit for the (blockd-specific) vlmc tool

12 years agoFix a bug in device id assignment
Stratos Psomadakis [Thu, 16 Feb 2012 22:17:12 +0000 (00:17 +0200)]
Fix a bug in device id assignment

12 years agoxsegbd: Add name in sysfs device attrs
Stratos Psomadakis [Wed, 11 Jan 2012 08:18:34 +0000 (10:18 +0200)]
xsegbd: Add name in sysfs device attrs

12 years agoMinor fix in request_fn
Stratos Psomadakis [Sun, 8 Jan 2012 18:40:49 +0000 (20:40 +0200)]
Minor fix in request_fn

12 years agoCorrect string handling for target names
Stratos Psomadakis [Sun, 8 Jan 2012 18:35:51 +0000 (20:35 +0200)]
Correct string handling for target names

12 years agoInitial support for target names
Stratos Psomadakis [Sun, 8 Jan 2012 17:11:18 +0000 (19:11 +0200)]
Initial support for target names

blockd will now only accept requests based on the target name (ie only for the
file it has opened), and will return an XS_ERROR reqeust otherwise.

xsegbd will now take a target name as an argument when adding a device via
sysfs, and will use that name as the target name for all the subsequent requests
fot that device.

12 years agoxsegbd: Release and error code paths fixes
Stratos Psomadakis [Sun, 8 Jan 2012 16:51:43 +0000 (18:51 +0200)]
xsegbd: Release and error code paths fixes

Fix issues with the release / exit and error handling code paths.

12 years agoxq: Fix iteration bug in xq_head_to_tail()
Stratos Psomadakis [Sun, 8 Jan 2012 15:40:08 +0000 (17:40 +0200)]
xq: Fix iteration bug in xq_head_to_tail()

Since __xq_pop_head() decrements head to point to the (new) first
available item in the queue, xq_head_to_tail() should iterate headq
forward (by incrementing head), not backwards. Backward iteration
results in xq corruption, which can easily be triggered using
alloc_requests()/free_requests() functions.

12 years agofix broken xq_head_to_tail()
gtsouk [Fri, 6 Jan 2012 12:01:22 +0000 (14:01 +0200)]
fix broken xq_head_to_tail()

used by xseg_free_requests(),
bug exposed by add/remove device tests by psomas.

Also, refactor so that __xq_append_tail() returns
the index to the leftmost (least) side of the queue buffer,
as is the convention with all other 3 functions
__xq_{append,pop}{head,tail}()

for __xq_append_tail(), the leftmost side of the buffer is
(new tail + 1):
 .---- nr ----.
 XXXXXXXXXXXXXX---------------------
^             ^                     ^
new tail     old tail              head

12 years agofix race condition on error when opening the same file from diffrent threads
Giannakos Filippos [Thu, 5 Jan 2012 18:17:05 +0000 (20:17 +0200)]
fix race condition on error when opening the same file from diffrent threads

12 years agoremove per cache entry lock. replace it with atomic operations in ref count
Giannakos Filippos [Thu, 5 Jan 2012 18:02:40 +0000 (20:02 +0200)]
remove per cache entry lock. replace it with atomic operations in ref count

12 years agoadd xinfo support
Giannakos Filippos [Thu, 5 Jan 2012 17:05:33 +0000 (19:05 +0200)]
add xinfo support

12 years agoget rid of flush. call fsync after write
Giannakos Filippos [Wed, 4 Jan 2012 23:37:18 +0000 (01:37 +0200)]
get rid of flush. call fsync after write

12 years agofix xseg_signal() posix retval and warning
gtsouk [Wed, 4 Jan 2012 23:15:28 +0000 (01:15 +0200)]
fix xseg_signal() posix retval and warning

12 years agofix bug in cache
Giannakos Filippos [Wed, 4 Jan 2012 21:32:31 +0000 (23:32 +0200)]
fix bug in cache

12 years agoinitial threaded filed commit
Giannakos Filippos [Wed, 4 Jan 2012 20:05:03 +0000 (22:05 +0200)]
initial threaded filed commit

12 years agoMerge wip-sysfs into xseg, with amendments
gtsouk [Wed, 4 Jan 2012 19:18:14 +0000 (21:18 +0200)]
Merge wip-sysfs into xseg, with amendments

Conflicts:
xseg/sys/xsegbd.c

Amendments:
struct completion is now per-request, not per-device.
The xsegbd callback (heuristically) knows when
xreq->priv is an index of an I/O request or a pointer
to a completion struct, and branches out accordingly.

The request is handled by the blocker,
and now, xsegbd_get_size() can cause initialization to fail.

Untested.

12 years agoReplace busy-wait loop in get_size with completion
Stratos Psomadakis [Wed, 4 Jan 2012 13:56:55 +0000 (15:56 +0200)]
Replace busy-wait loop in get_size with completion

12 years agoMerge branch 'wip-sysfs' into xseg
gtsouk [Wed, 4 Jan 2012 12:43:03 +0000 (14:43 +0200)]
Merge branch 'wip-sysfs' into xseg

Conflicts:
xseg/sys/xsegbd.c

There is printk-logging leading up to a lock-up
in get_size(). This is currently broken.

12 years agomake some field types arch-neutral
gtsouk [Wed, 4 Jan 2012 09:53:50 +0000 (11:53 +0200)]
make some field types arch-neutral

12 years agoMerge branch 'wip-xinfo-fixed' into xseg
gtsouk [Tue, 3 Jan 2012 22:56:57 +0000 (00:56 +0200)]
Merge branch 'wip-xinfo-fixed' into xseg

Conflicts:
xseg/sys/xsegbd.c [trivial]

12 years agoSimplify callback req demultiplexing (temp).
Stratos Psomadakis [Tue, 3 Jan 2012 19:35:23 +0000 (21:35 +0200)]
Simplify callback req demultiplexing (temp).

Until prepare_wait() is fixed to support an extra
argument, we can manually assign port.waitcue to the address of the
appropriate xsegbd_device struct before submitting the request,
simplifiying the callback request demultiplexing (don't iterate
the devices list).

12 years agoxsegbd: add multiple 'disk' support via sysfs.
Stratos Psomadakis [Tue, 3 Jan 2012 15:44:53 +0000 (17:44 +0200)]
xsegbd: add multiple 'disk' support via sysfs.

Add initial (not tested/buggy) multiple disk support to xsegbd via a
sysfs interface similar to rbd.

12 years agoadd support for larger than 1 segment requests + xseg_signaling.
Giannakos Filippos [Fri, 23 Dec 2011 12:35:57 +0000 (14:35 +0200)]
add support for larger than 1 segment requests + xseg_signaling.

12 years agoxsegbd: Don't destroy the segment, if it exists.
Stratos Psomadakis [Thu, 22 Dec 2011 21:24:08 +0000 (23:24 +0200)]
xsegbd: Don't destroy the segment, if it exists.

12 years agoAllow disksize override with sector_size parameter.
Stratos Psomadakis [Thu, 22 Dec 2011 21:13:54 +0000 (23:13 +0200)]
Allow disksize override with sector_size parameter.

Allow a non-zero sector_size module parameter to override the disk
size returned by xsegbd_get_size()

12 years agoMinor fixes in xsegbd_get_size().
Stratos Psomadakis [Thu, 22 Dec 2011 21:07:38 +0000 (23:07 +0200)]
Minor fixes in xsegbd_get_size().

Remove the useless prep_wait() and cancel_wait() calls in xsegbd_get_size() and
add some comments to document its behavior.

12 years agoMove segment unmap() in xsegbd module.
Stratos Psomadakis [Thu, 22 Dec 2011 20:54:56 +0000 (22:54 +0200)]
Move segment unmap() in xsegbd module.

We cannot unmap a segment in xseg_destroy(), since the segment may not
be mapped. Since it currently only affects xsegbd, move it in
xsegbd_xseg_quit(), inside the xsegbd module.

12 years agoRefactor cmd_info() code in xseg-tool.
Stratos Psomadakis [Thu, 22 Dec 2011 20:47:03 +0000 (22:47 +0200)]
Refactor cmd_info() code in xseg-tool.

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

12 years agoMake xsegbd query peer for disk size(using X_INFO)
Stratos Psomadakis [Thu, 22 Dec 2011 14:35:51 +0000 (16:35 +0200)]
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).

12 years agoMake sure to unmap the segment in xseg_destroy()
Stratos Psomadakis [Thu, 22 Dec 2011 14:29:28 +0000 (16:29 +0200)]
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.

12 years agoAdd (initial) support for X_INFO request operation
Stratos Psomadakis [Wed, 21 Dec 2011 20:27:08 +0000 (22:27 +0200)]
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.

12 years agoremove race condition on xseg_request state
Giannakos Filippos [Mon, 19 Dec 2011 14:57:14 +0000 (16:57 +0200)]
remove race condition on xseg_request state

12 years agomake blockd loop over pending ios.
Giannakos Filippos [Fri, 16 Dec 2011 15:25:08 +0000 (17:25 +0200)]
make blockd loop over pending ios.

12 years agoremove close with negative file descriptor
Giannakos Filippos [Fri, 16 Dec 2011 15:24:20 +0000 (17:24 +0200)]
remove close with negative file descriptor

12 years agoMerge branch 'philfix'
Giannakos Filippos [Fri, 16 Dec 2011 10:47:59 +0000 (12:47 +0200)]
Merge branch 'philfix'

12 years agoinitialize lock in xq initialization.
Giannakos Filippos [Fri, 16 Dec 2011 10:41:12 +0000 (12:41 +0200)]
initialize lock in xq initialization.

12 years agoremove obsolete XSEG_{FLUSH,FUA}.
Giannakos Filippos [Fri, 16 Dec 2011 10:37:36 +0000 (12:37 +0200)]
remove obsolete XSEG_{FLUSH,FUA}.

12 years agoinitial commit of sosd
Giannakos Filippos [Thu, 15 Dec 2011 13:06:43 +0000 (15:06 +0200)]
initial commit of sosd

12 years agoMerge branch 'philfix'
Georgios D. Tsoukalas [Tue, 13 Dec 2011 15:51:42 +0000 (17:51 +0200)]
Merge branch 'philfix'

12 years agofix buffer handling on incomplete/resubmitted reqs
Giannakos Filippos [Tue, 13 Dec 2011 15:40:10 +0000 (17:40 +0200)]
fix buffer handling on incomplete/resubmitted reqs

12 years agofix log_io printing beyond end-of-string garbage
Giannakos Filippos [Tue, 13 Dec 2011 15:28:43 +0000 (17:28 +0200)]
fix log_io printing beyond end-of-string garbage

12 years agoAdd pthread to linked libraries
Georgios D. Tsoukalas [Tue, 13 Dec 2011 15:19:00 +0000 (17:19 +0200)]
Add pthread to linked libraries

12 years agorelax shared segment access precautions
Georgios D. Tsoukalas [Tue, 13 Dec 2011 15:12:00 +0000 (17:12 +0200)]
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.

12 years agofix invalid shared pointer access and wrong retval
Giannakos Filippos [Tue, 13 Dec 2011 14:51:14 +0000 (16:51 +0200)]
fix invalid shared pointer access and wrong retval

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

12 years agorelax redundant shared access precautions
Georgios D. Tsoukalas [Tue, 13 Dec 2011 14:33:35 +0000 (16:33 +0200)]
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.

12 years agofix invalid pointer access to shared segment.
Giannakos Filippos [Tue, 13 Dec 2011 14:25:46 +0000 (16:25 +0200)]
fix invalid pointer access to shared segment.

Also, add locking and copying shared data, for safety.

12 years agoinitialization from my own repository
Georgios D. Tsoukalas [Tue, 13 Dec 2011 09:47:57 +0000 (11:47 +0200)]
initialization from my own repository