brick_mem: add /proc/sys/mars/mem_allow_freelist
if: set capacity upon regular switch() maintenance
bio: fix usage of i_size_read()
if: fix set_capacity()
light: prevent races on device size
all: make *_switch() code idempotent

New semantics: it must be possible to call the switch functions
even when nothing has changed.
server: fix socket shutdown in error path
light: fix copy_next_is_available propagation
light: report next logfile to be copyable in case of logfile sequence holes

Up to now holes in the logfile sequence caused the copy process to stop after
having fetched the last logfile before the hole.

E.g. in emergency mode such holes are created intentionally on the primary
side. After the situation has been cleaned up, the secondary must be able to
fetch newly created logfiles.

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
light: allow logfiles not to be consecutive on secondary site

If there are holes in the logfile sequence and this holes concern only logfiles
which are already applied (i.e. logfiles lying before all replay links)
the secondary can continue working.
Warnings are written as long as the situation exists.

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: leave-resource removes logfiles and version links of the resource

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: invalidate does not delete logfiles or version links anymore

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
marsadm: correct message

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>