archipelago
12 years agopurge unused variables
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:35:24 +0000 (21:35 +0300)]
purge unused variables

12 years agoC99 compliant __VA_ARGS__ handling
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:33:15 +0000 (21:33 +0300)]
C99 compliant __VA_ARGS__ handling

12 years agokstrtoul to strict_strtoul for old kernel support
Georgios D. Tsoukalas [Tue, 5 Jun 2012 18:30:58 +0000 (21:30 +0300)]
kstrtoul to strict_strtoul for old kernel support

12 years agopeers/xsegbd: Possible NULL ptr deref in release
Stratos Psomadakis [Tue, 29 May 2012 14:18:25 +0000 (17:18 +0300)]
peers/xsegbd: Possible NULL ptr deref in release

12 years agopeers: Some changes to xseg-tool submit_reqs/complete cmds
Stratos Psomadakis [Tue, 29 May 2012 14:16:52 +0000 (17:16 +0300)]
peers: Some changes to xseg-tool submit_reqs/complete cmds

12 years agodoc: Basic commands to test xsegbd/vlmcd/mapperd/filed end-to-end
Stratos Psomadakis [Tue, 29 May 2012 14:12:19 +0000 (17:12 +0300)]
doc: Basic commands to test xsegbd/vlmcd/mapperd/filed end-to-end

12 years agoxseg-tool: Add submit_reqs cli option
Stratos Psomadakis [Fri, 25 May 2012 11:02:48 +0000 (14:02 +0300)]
xseg-tool: Add submit_reqs cli option

12 years agoxseg: some 'perfcounters' cleanup/changes, and a possible out-of-range index fix
Stratos Psomadakis [Fri, 25 May 2012 11:02:11 +0000 (14:02 +0300)]
xseg: some 'perfcounters' cleanup/changes, and a possible out-of-range index fix

12 years agodrivers/xseg: Fix signalling for posix peers
Stratos Psomadakis [Wed, 16 May 2012 23:04:01 +0000 (02:04 +0300)]
drivers/xseg: Fix signalling for posix peers

 * tkill was called with the arguments in reverse order: (signo, tid)
   instead of (tid, signo).
 * Increase the timeouts for xseg_signal, now that signalling actually
   works. We could as well get rid of the timeout completely.
 * kernel peers could never signal posix peers, since xseg_posix
   driver/module for segdev peers was never built and loaded.

12 years agotools: Fix some errors after the name to target renames
Stratos Psomadakis [Wed, 16 May 2012 23:03:01 +0000 (02:03 +0300)]
tools: Fix some errors after the name to target renames

(Need a lot more fixes to bring the up-to-date with the new code)

12 years agodoc: Start documenting xseg terms and operation
Stratos Psomadakis [Wed, 16 May 2012 23:01:44 +0000 (02:01 +0300)]
doc: Start documenting xseg terms and operation

12 years agoxseg: Add some perf counters (request rtt/latency)
Stratos Psomadakis [Wed, 16 May 2012 23:01:01 +0000 (02:01 +0300)]
xseg: Add some perf counters (request rtt/latency)

12 years agoxseg: Rename req->name to req->target in xseg_request
Stratos Psomadakis [Wed, 6 Jun 2012 11:50:58 +0000 (14:50 +0300)]
xseg: Rename req->name to req->target in xseg_request

Rename req->name to req->target in struct xseg_request, and change
buffersize/namesize/datasize to bufferlen/targetlen/datalen
accordingly.

12 years agoAlso clean sosd
Vangelis Koukis [Fri, 11 May 2012 07:48:25 +0000 (10:48 +0300)]
Also clean sosd

12 years agozero out rest of data buffer on end of file
Giannakos Filippos [Fri, 16 Dec 2011 19:10:07 +0000 (21:10 +0200)]
zero out rest of data buffer on end of file

12 years agoMerge branch 'sosd' into demo
Stratos Psomadakis [Wed, 4 Apr 2012 08:24:28 +0000 (11:24 +0300)]
Merge branch 'sosd' into demo

Conflicts:
xseg/peers/Makefile

'Ported' the sosd peer and libsos to the new repo layout and build
system. Also fixed some sosd issues with the recent changes in xseg
API.

12 years agoxseg-tool: Add req logging support for bridge mode
Stratos Psomadakis [Tue, 3 Apr 2012 13:49:23 +0000 (16:49 +0300)]
xseg-tool: Add req logging support for bridge mode

12 years agoAdd resize support in xsegbd/filed-blockd/vlmc-tool
Stratos Psomadakis [Tue, 3 Apr 2012 13:04:58 +0000 (16:04 +0300)]
Add resize support in xsegbd/filed-blockd/vlmc-tool

12 years agoxsegbd: Make sysfs add/remove more robust
Stratos Psomadakis [Tue, 3 Apr 2012 11:13:42 +0000 (14:13 +0300)]
xsegbd: Make sysfs add/remove more robust

Use a separate spinlock to serialize access on the dev list, instead
of the sysfs/bus mutex, and make sure the device is not removed from
the dev list too early.

The change was 'ported' from Alex Elder's patches for the rbd block
driver.

12 years agoextstorage vlmc scripts refactoring
Stratos Psomadakis [Mon, 2 Apr 2012 10:32:22 +0000 (13:32 +0300)]
extstorage vlmc scripts refactoring

12 years agoInitial import of the ganeti extstorage vlmc scripts
Stratos Psomadakis [Thu, 29 Mar 2012 14:34:59 +0000 (17:34 +0300)]
Initial import of the ganeti extstorage vlmc scripts

12 years agoVarious fixes to make xseg functional again
Stratos Psomadakis [Thu, 29 Mar 2012 13:15:05 +0000 (16:15 +0300)]
Various fixes to make xseg functional again

 * xseg:
- Make sure the allocated xseg struct in xseg_join is initialized
  correctly
- Initial implementation for xseg_leave()
- Add __lock_domain in xseg_destroy()

 * driver api:
- Add a struct xseg * argument to xseg_operations->map(). It's
  passed to the driver when a peer joins the segment, and it's
  used by xseg_segdev kernel driver (for the initialization of
  xsegments[] array).

 * drivers/kernel/xseg_segdev:
    - Use struct xseg * segdev_map() to initialize the xsegments[]
  array.
- Some minor fixeds

 * sys/segdev:
    - Fix wait_for_event_interruptible condition (this fixes an issue
  with xseg-tool not being able to destroy segdev segments).
- Correct the use of segdev_get/put() in various places.

 * build system:
    - Add distclean target, which cleans lib/user and lib/kernel dirs.
- Fix the clean target in sys/user dir.
- Temp exclude of the vlmc peer (it doesn't compile)

 * tools:
    - Modify the helper/setup/vlmc scripts, to work with the new
  repo/code layout.

 * xsegbd:
    - Minor fix in xseg_callback() (xseg_receive() wasn't fixed after
  the refactoring)

12 years agoFIx .gitignores for the new build system
Stratos Psomadakis [Fri, 23 Mar 2012 12:15:09 +0000 (14:15 +0200)]
FIx .gitignores for the new build system

12 years agoMerge remote branch 'origin/xseg' into demo
Stratos Psomadakis [Fri, 23 Mar 2012 11:53:58 +0000 (13:53 +0200)]
Merge remote branch 'origin/xseg' into demo

Conflicts:
xseg/tools/vlmc-blockd.py [trivial]

12 years agoFix rc file parsing for the vlmc python tools
Stratos Psomadakis [Fri, 23 Mar 2012 11:36:32 +0000 (13:36 +0200)]
Fix rc file parsing for the vlmc python tools

12 years agoImprove error handling for xseg setup scripts
Stratos Psomadakis [Fri, 23 Mar 2012 11:36:06 +0000 (13:36 +0200)]
Improve error handling for xseg setup scripts

12 years agoremove spurious include paths from compilation
Georgios D. Tsoukalas [Tue, 28 Feb 2012 06:14:52 +0000 (08:14 +0200)]
remove spurious include paths from compilation

12 years agoMerge branch 'vlmcd-as-blockd' into xseg
Vangelis Koukis [Mon, 27 Feb 2012 16:56:20 +0000 (18:56 +0200)]
Merge branch 'vlmcd-as-blockd' into xseg

Conflicts:
xseg/peers/Makefile
Fixes:
fix target autodetection in base.mk
fix issues with vlmcd, still does not build

12 years agoREADME placeholder files for lib/ directories
Georgios D. Tsoukalas [Mon, 27 Feb 2012 16:36:46 +0000 (18:36 +0200)]
README placeholder files for lib/ directories

12 years agoIntroduce execution domains in code and building
Georgios D. Tsoukalas [Sun, 26 Feb 2012 20:30:12 +0000 (22:30 +0200)]
Introduce execution domains in code and building

Only fixed to compile. Untested.

Lots of refactoring, cleanup, and fixing in the process.
This log has three parts:
1. What are execution domains and why we need them
2. What are the API incompatibilities introduced
3. Issues that were discovered in the process,
   and how they were fixed, or how they need fixing.

Note that there are many changes not documented in this log.

1. Execution Domains.

The execution domains are simply the different environments where
the xseg library, drivers and peers are compiled and linked in.
Currently there are two domains, 'user' for userspace processes,
and 'kernel' for kernel modules. The rule of thumb is that if you
need to compile it differently, then you need a new execution domain.

New domains could be introduced, for example,
so that xseg runs inside a hypervisor, another OS/arch, or even
to have two different implementations of xseg run together.
Until now, the kernel domain was all stuffed in sys/,
domain, drivers, and peers together.

The new repository layout defines domains nicely:

sys/${DOMAIN}/    ->    domain specific support code
drivers/${DOMAIN/ ->    drivers available to the domain
peers/${DOMAIN}/  ->    the peers that execute in the domain
lib/${DOMAIN/     ->    built libraries, modules for the domain

The kernel domain has been split into four parts:
a. the xseg.ko library kernel module in sys/kernel.
   (this includes the domain support code in xsegmod.c)
b. the segdev.ko (renamed from xsegdev) character device in sys/kernel
   (this could be part of the driver, but is generic enough
    to be included into the domain to be generally available)
c. the xseg_segdev.ko segdev segment and peer driver in drivers/kernel
d. the xsegbd.ko segdev peer in peers/kernel

Similar is the layout for the user domain.
The domain support code is in sys/user/xseg_user.c

The domain support code finds out what it must implement in
various "domain.h" files in the tree, currently:
xq/domain.h
xseg/domain.h
sys/domain.h

2. API changes
==============

i.   xseg_initialize() no longer takes an argument.
     Instead, the type of the peer is decided at xseg_join().
     This way a program may implement more than one type of peers
     (in the same, or different segments)
     xseg_initialize() is only for library initialization.

ii.  xseg_join takes two more arguments:
     a. the name of the peer type to be initialized
     b. a callback function for fully asynchronous peers,
        such as xsegbd, who can never sleep in wait_for_signal()
        This callback is just registered by the library;
        if the driver does not call it, it will never be.

iii. xseg_wait_signal() no longer takes a portno argument.
     This was a mistake.
     The sleep is intended to be as generic as possible.
     Ideally, the library (through the domain support code)
     should offer a wakeup method in all possible ways
     (e.g. from other peers as with xseg_signal(),
      from the peer context e.g. with select() in user,
      or waitqueues in kernel, signals, timers, ...)

      Right now, the peer has to schedule its wakeup
      by using xseg_signal on itself from another context,
      or by exploiting the same mechanism that the peer driver does
      (e.g. SIGIO)

Deeper in the library, the driver interface for signaling was changed
so that functions take the full segment descriptor plus the portno,
rather than just a pointer to the port.

3. Issues
=========

* Kill security.
  Any peer signaling a segdev peer can send SIGIO to any process in the system.
  There is no infrastructure for signaling security.
  The segment could be limited to a specific uid, so that
  all peers must be run as this user,
  and all kills are made as (with the permissions of) this user.

* Killing threads.
  Posix driver for kernel and user domains kills specific threads with SIGIO,
  and not processes. Before this commit, the kernel driver killed threads,
  while the user driver killed processes.
  It is trivial to change the behavior to one or the other, if we need to.

  Killing processes has the advantage that a multithreaded user peer
  need not have a master peer that will accept and dispatch work.
  The kernel will send a waking signal to one of the sleeping threads.

  However, killing threads provides more flexibility,
  while it can emulate the other way:
  All threads when sleeping, they register the id of the master thread,
  so at all times, only the master thread receives signals.
  Then, the master thread can kill the process and emulate
  a process-killing signal.

  Currently, the posix driver registers the id of the thread
  that initializes the library as the master thread.
  Fine tunings will probably be needed for this to work correctly.

* Callback design & code cleanup.
  xsegbd cannot sleep. So may other peers in the future,
  or so we might decide to implement some otherwise sleepable ones.
  prepare/cancel_wait() and wait_signal() are not used by such peers.
  Instead, a callback is registered at join,
  which takes a segment descriptor and the signalled port as arguments.
  The library only registers the callback in the segment descriptor.
  It is up to the peer drivers to schedule its call upon signaling.

  In the case of xsegbd, the peer driver (xseg_segdev) utilizes
  the kernel domain support character device (segdev).
  The userspace segdev driver calls the kernel segdev driver through
  /dev/segdev, and the kernel segdev calls the xsegbd-registerd callback
  through the xseg descriptor.

  Currently there is support for only one segdev character device,
  and only one kernel segdev peer, but the design is easily extensible.

  xsegdev was renamed to segdev.
  Notice that in the whole segdev code there is no reference to xseg
  (thus the rename). Segdev is considered an independent utility
  that supports the kernel domain.

* Make will pass V=1 to kbuild, so that verbosity can be controlled
  from the top-level make.

* ${XSEG_HOME}/envsetup is an environment-setting tool that will either
  - initialize variables if sourced
  - initialize variables and start a shell if executed with no arguments
  - printout variables if executed with 'show'

  Its intended use is from the command line, to set up a dev shell,
  and it is used by the makefiles to set up/discover the environment.

* The build system was improved.
  (fewer includes, more central configuration, more automation, etc)

  The top-level base.mk is at the heart of it,
  discovering and setting most of the variables,
  while defining global rules.

  It uses envsetup for basic variables and
  tools/xseg-domain-targets to auto-detect what targets are available
  in the tree.

* LOGMSG was renamed to XSEGLOG and promoted to domain-specific.
  The xsegbd-specific XSEGLOG was discarded.

* xsegbd hacks.
  There were some ugly hacks and bad stuff in how xsegbd handled
  its signalling via callbacks, and specifically how it blocked to
  wait for device size. A pointer was overlayed in a private field
  along with an integer, and circulated through the userspace,
  before being intrusively extracted from port->waitcue and
  auto-detected as pointer.

  Now there are are proper structures (struct pending)
  for distinguishing among asynchronous or completion-blocked requests,
  and the callbacks all run through well defined interfaces.

* xsegbd hazards.
  The initialization of xsegbd, both in sysfs and in disk,
  has memory leaks, not freeing memory on failure.

  The loop receiving requests within the callback,
  may receive replies for more than one device,
  and therefore needs to call request_fn's for more than one device.
  This was fixed (not tested).

12 years agoMerge branch 'xseg' into vlmcd-as-blockd
Vangelis Koukis [Sun, 26 Feb 2012 09:22:01 +0000 (11:22 +0200)]
Merge branch 'xseg' into vlmcd-as-blockd

12 years agoInitial, completely broken skeleton of a vlmcd
Vangelis Koukis [Sun, 26 Feb 2012 09:20:41 +0000 (11:20 +0200)]
Initial, completely broken skeleton of a vlmcd

Initial, completely broken skeleton of a vlmcd,
single-threaded, modelled after blockd.

There doesn't seem to be a need for multithreaded
operation if a peer is only interacting with other xseg peers.

12 years agososd: add dummy X_INFO reply. all images to 20GB.
Giannakos Filippos [Fri, 24 Feb 2012 15:37:39 +0000 (17:37 +0200)]
sosd: add dummy X_INFO reply. all images to 20GB.

12 years agomove qa/ to tools/
Georgios D. Tsoukalas [Fri, 24 Feb 2012 15:40:11 +0000 (17:40 +0200)]
move qa/ to tools/

12 years agoenvsetup script to exec or source for env setup
Georgios D. Tsoukalas [Fri, 24 Feb 2012 15:34:24 +0000 (17:34 +0200)]
envsetup script to exec or source for env setup

Sets up XSEG_HOME PATH LD_LIBRARY_PATH etc.

If it is executed, it starts a new $SHELL.
If it is sourced, it just exports the variables.

12 years agofiled: Fix lost wakeups between IO-threads
Stratos Psomadakis [Fri, 24 Feb 2012 09:27:09 +0000 (11:27 +0200)]
filed: Fix lost wakeups between IO-threads

Race condition with free_io() / wait_cond() and alloc_io() /
cond_signal(), results in lost-wakeups between IO threads
and causes threads and eventually filed to deadlock.

Thread 1        Thread 2
free_io x          -
   -            alloc_io x
   -            cond_signal x
lock_cond x        -
wait_cond x        -

Move free_io() inside the mutex locked section before
sleeping, and lock the mutex in wake_iothread before
signalling the thread, to avoid the deadlock.

12 years agodrop flush support. maybe in the future
Giannakos Filippos [Wed, 22 Feb 2012 17:40:50 +0000 (19:40 +0200)]
drop flush support. maybe in the future

12 years agososd output only on verbose
Giannakos Filippos [Wed, 22 Feb 2012 17:19:39 +0000 (19:19 +0200)]
sosd output only on verbose

12 years agoreplace blockd names with sosd
Giannakos Filippos [Wed, 22 Feb 2012 17:17:04 +0000 (19:17 +0200)]
replace blockd names with sosd

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()