Revert "reiser4: fix reiser4_rename_common: memset (foo, 0, sizeof foo)."

This reverts commit 119348213165c57f225c1ed6ce2e4a3c03734beb.

Superseded by another patch.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: Fixups

. Fix up incorrect calculation of REISER4_SUPER_MAGIC_STRING size;
. Fix up incorrect initialization of dataonstack, dotdot_entry,
  dotdot_name variables in reiser4_rename_common().

Signed-off-by: Edward Shishkin <edward.shishkin@gmail.com>
reiser4: fix reiser4_post_{commit,write_back}_hook() and their invocations.

- let all hooks be called from one place (reiser4_write_logs())
- don't call reiser4_post_write_back_hook() twice
- fix reiser4_post_write_back_hook(): call the correct method of space allocator

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: make space_allocator's check_blocks() reusable.

Make check_blocks() return a boolean value (whether did the extent's
state match our expectations) instead of asserting success and crashing
system otherwise.
Also make it possible to check extents spanning multiple bitmap blocks.

The only user of reiser4_check_block() in its previous form has been updated
to assert on true return value.

Thus check_blocks() can now be reused by various parts of reiser4, e. g.
by the discard subsystem which will be added in next commits.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: add an implementation of "block lists", splitted off the discard code.

The block list is a less memory efficient, but ordered (and thus sortable)
implementation of the same concept as the blocknr_set.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: blocknr_list: use kmem_cache instead of kmalloc for allocating entries.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: blocknr_set: use kmem_cache instead of kmalloc for allocating entries.

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
reiser4: discard support: initial implementation using blocknr_list, without extent padding.

Now reiser4_post_write_back_hook() is used for discarding and completing
deferred deallocations. The invocation of this hook has been moved past
immediate deallocations in the wandered logs code. Also, when discard is
enabled, immediate deallocations are made deferred, and discard procedure
takes place before any deallocations are completed. This allows to avoid
costly bitmap checks at discard time.

Implementation details:

- before discarding, the delete set is sorted and extents are merged
- each extent is submitted to discard as-is (blocks in all extents
  are still marked as allocated at this point, so there can be no races)
- processing stops at first failure (this does not fail atom commit)

For now (shortcomings):

- extents are not padded to erase unit boundaries

Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>