Commit Graph

652 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer b0c09061e9 marsadm: allow only multiples of 4k as size arguments 2013-04-25 22:32:37 +02:00
Thomas Schoebel-Theuer c411a6f243 aio: fix local replay
side effect / regression from 814b92ba19
2013-04-25 16:28:48 +02:00
Thomas Schoebel-Theuer 46f815f54e marsadm: add optional size argument to resize command 2013-04-25 16:06:18 +02:00
Thomas Schoebel-Theuer 803a1c8419 infra: fix race on deletion of say channels 2013-04-25 16:03:48 +02:00
Thomas Schoebel-Theuer 8d93439dcb marsadm: add new command 'set-replay' 2013-04-22 14:40:24 +02:00
Thomas Schoebel-Theuer 22f75b9d71 marsadm: rewrite / correct symlink faking 2013-04-22 14:40:24 +02:00
Thomas Schoebel-Theuer 03f418c2c7 marsadm: improve message texts and parameter semantics 2013-04-22 11:50:07 +02:00
Thomas Schoebel-Theuer 8f081105fd marsadm: fix distinction _get_{designated,actual}_primary 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer 109eed06f3 marsadm: fix and unify readlink() usage 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer 78c7c307ea marsadm: fix primary checks 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer 20166b6c01 infra: better optimization of memory allocations 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer 1202f2ae8e trans_logger: fix emergency mode (cease_logging) 2013-04-22 11:48:50 +02:00
Thomas Schoebel-Theuer 0c7bb9d00f if: fix bio flags for newer kernels
The old code was just bullshit.
2013-04-19 09:30:15 +02:00
Thomas Schoebel-Theuer e4e9308310 if: improve performance of big bio requests
Writethrough of bio requests having more than one biovec should
only sync the last one. The others will be written to the transaction
log anyway. No need to wait for each of them to be committed one
by one.
2013-04-18 18:38:03 +02:00
Thomas Schoebel-Theuer 8f6054b0cc trans_logger: call _flush_inputs() more often
The old behaviour could lead to starvation effects.
In particular, direct IO writes were affected.
2013-04-18 18:31:38 +02:00
Daniel Hermann 92951e491b marsadm: improve primary/secondary command behaviour
Previously, the 'marsadm primary' and 'marsadm secondary' commands
were successful as soon as the target primary was successfully set
to the new primary or '(none)', respectively.  This commit appends
a check to wait until the primary is really changed (actual state).

Changes in marsadm:
- Added check_primary_settled() function
- Do not use local variable named '$host' in _primary_res() since
  a global variable with same name exists.
- Do not use/set global variable '$host' in primary_res().  Use
  local variable '$new' initially set to '$host' instead.
- Make 'secondary' command idempotent ("is already secondary")
- Call trigger() and check_primary_settled() in primary_res()

Related minor changes:
- marsadm: Added optional parameter 'sleeptime' to sleep_timeout()
- Removed debug output in check_file_aged()

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-18 10:09:15 +02:00
Thomas Schoebel-Theuer f2b8256fcd marsadm: categorize commands correctly 2013-04-17 12:03:00 +02:00
Thomas Schoebel-Theuer e02c06e265 marsadm: disallow --force on 'all' resources 2013-04-17 12:03:00 +02:00
Thomas Schoebel-Theuer 9187bf210d marsadm: check for matching version numbers 2013-04-17 11:03:13 +02:00
Thomas Schoebel-Theuer 67b322d600 trans_logger: report replay errors separately 2013-04-16 11:31:42 +02:00
Thomas Schoebel-Theuer 5a5ea9bc52 infra: initialize IO transfer metadata correctly 2013-04-16 10:42:16 +02:00
Thomas Schoebel-Theuer 27fd43cb31 infra: remove obsolete black interface
The backing file should not be exposed from the brick blackbox.
2013-04-16 10:42:16 +02:00
Thomas Schoebel-Theuer 814b92ba19 aio: fix race on file length (workaround)
It appears that concurrent reads and writes on AIO seem to
result in inconsistent reads in some very rare cases, due to
races. Sometimes, the inode claims that the file has been already
appended by a write operation, but the data has not actually hit
the page cache, such that a concurrent read gets NULL blocks.

This is a workaround by "misusing" the mapfree infrastructure.
It depends on uniqueness of file names, which is not the right thing
to do.

Best fix would be in the kernel.
2013-04-16 10:42:16 +02:00
Thomas Schoebel-Theuer fa48bb94d0 infra: add tracing of max region to mapfree 2013-04-16 10:04:43 +02:00
Thomas Schoebel-Theuer 1cf400bdfb lib_log: change misleading wording of error message 2013-04-16 10:04:43 +02:00
Thomas Schoebel-Theuer b0b9723cb2 trans_logger: fix possible endless loop on termination 2013-04-16 10:04:43 +02:00
Thomas Schoebel-Theuer d8ad1718bb server: fix crash on shutdown
seems to be a regression from 03803eee
2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer e106d77721 infra: improve tatomic debugging 2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer 7e2be30c57 bio: improve debugging 2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer b7f1e97def server: safeguard error handling 2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer 0f6c98ae4d net: fix bad return value of mars_send_raw() 2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer 5fc2fa0adb aio: fix comm info of event threads 2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer be412e736d copy: avoid higher-order pages for state tables 2013-04-15 18:37:12 +02:00
Thomas Schoebel-Theuer 1e56c2bffc client: avoid higher-order pages for hashing 2013-04-15 18:37:11 +02:00
Thomas Schoebel-Theuer 3ca7f91900 if: avoid higher-order pages for hashing 2013-04-15 18:37:11 +02:00
Thomas Schoebel-Theuer e7c67b73b1 trans_logger: avoid higher-order pages for hashing 2013-04-15 18:37:11 +02:00
Thomas Schoebel-Theuer d1abe646a6 infra: improve tatomic debugging 2013-04-15 18:37:11 +02:00
Daniel Hermann af0c99abf1 infra: Makefile.dist fix GITHEAD initialization
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-15 18:34:44 +02:00
Thomas Schoebel-Theuer 6570a8ea59 net: select server statistics separately 2013-04-12 09:59:44 +02:00
Daniel Hermann 8af110184a infra: Makefile.dist add scripts/ subdir to DISTDIRS
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-12 08:56:17 +02:00
Daniel Hermann e9bb100820 infra: Makefile.dist include GIT HEAD in DISTVERSION file
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-12 08:49:04 +02:00
Daniel Hermann 9bcc99da6f infra: move script 'gen_config.pl' to scripts/
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-12 08:46:58 +02:00
Thomas Schoebel-Theuer f5fae8e4ba light: show runtime connection status information 2013-04-12 08:26:25 +02:00
Thomas Schoebel-Theuer cc0b41ca79 light: track incompatible changes of /mars/ symlink tree layout
In future, any incompatible changes to the symlink tree must be
recognizable by the userspace tools by means of a version number.
2013-04-11 16:56:43 +02:00
Thomas Schoebel-Theuer bd458a93c5 net: fix crash on deleted server socket
Once a connection is bad, stop sending messages.

Seems to be a regression from 03803ee
2013-04-11 16:56:43 +02:00
Daniel Hermann 4dafa9467a marsadm: use actual primary where appropriate instead of target primary
The actual primary is decoded in 'actual-*/is-primary' links, while the
target primary is decoded in the 'primary' link.  This is not clearly
taken into account in several functions of marsadm.  This commit fixes
this problem.

- Added _get_actual_primary() function
- Remove $pri parameter in _primary_res
- Use _get_actual_primary() where actual state should be used

Commits 3e96a5e 578d003 5dccbdc rebased to dfeb8e6

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann 3bf3745ec8 marsadm: use lamport clock for checking modification timestamps of symlinks
- Added mars_time() function returning lamport clock
- Renamed check_mtime to check_file_aged and fixed to use mars_time()
- Renamed check_all_mtimes to check_files_modified_any_of

Commits eb849e2 1be8700 fbb415a rebased on dfeb8e6

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann 7a42f95d6c marsadm: renam _allowed_logdelete() to _min_nondeletable_logfile()
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann 5d3d777b86 marsadm: fix check_primary/check_not_primary to use actual state ('is-primary')
The actual state is decoded in 'actual-*/is-primary' links, while the target
state is decoded in the 'primary' link.
- check_primary() now uses actual state
- check_not_primary() now uses both actual state and target state

Commits c38a822 94ac15a rebased on eaba743

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00
Daniel Hermann 24ad742db4 infra: add Makefile.dist for administrative targets (distribution)
Makefile.dist contains targets for distribution/packaging, such as
the generation of release tarballs, and other administrative tasks.

Commits 43770d2 dfcd866 b04bf8d 68b9f2e 191cc1a dd6db46 rebased on eaba743

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-04-11 11:01:25 +02:00