debugging
   imera: protect against NPE in FsSqlDriver#read

    RB: https://rb.dcache.org/r/7385/
    Acked-by: Paul Millar
    Target: trunk
    Request: 2.11 2.10 2.9 2.8 2.7 2.6
(cherry picked from commit f1252364cceec877505eb98a736abcc984bc964e)
chimera: prevent attempts to remove '.' and '..'

we have in place checks for NFS, but not for the
other protocols.

Acked-by: Paul MIllar
Target: master, 2.11 ..  2.6
Require-book: no
Require-notes: no
(cherry picked from commit 8685d9a44881004f276c3f11bbe764c2f53953e8)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
(cherry picked from commit 2cdcfc458f648b07b20b35b2ae44921215c0e9e4)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
(cherry picked from commit e842115fa1c361200b80fa7a7aec86e9c04d4a2c)
When space cost factor is large, wass may run into a problem caused by
the limited precision of floating point arithmetic. When that happens
the code reaches a statement that was thought to be unreachable.

This patch adds a check that detects the situation and generates
a more suitable error message.

Target: trunk
Request: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
Require-notes: yes
Require-book: no
Acked-by: Karsten Schwank <karsten.schwank@desy.de>
Patch: https://rb.dcache.org/r/7399
(cherry picked from commit 5d005360fdb9e2e02929221c19ba0fa2f77a388b)
chimera: protect list initialization from FS inconsistencies

we observe that in some situations nlink count get out of
sync. As this is a bug by itself, protect directory listing
from from invalid initial capacity initialization.

Acked-by: Karsten Schwank
Target: master
Require-book: no
Require-notes: no
(cherry picked from commit d325d16e29e7454f3ecc916c0b54a42feb6903ee)
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
(cherry picked from commit 6ae8084e16fde14044e38dbc16b8c9b077972635)

Conflicts:
	modules/chimera/src/main/java/org/dcache/chimera/DirectoryStreamHelper.java
	modules/chimera/src/test/java/org/dcache/chimera/DirectoryStreamHelperTest.java