systemd notification support

tgtd may take some time to initialize before accepting management
commands. Since management commands are used to bring the targets up
during service startup, we have to make sure that tgtd is responsive
before proceeding. To this end, we add a call to sd_notify(3) right
before entering the event loop to signal systemd (if applicable) that
the main process is ready.

Systemd support with the relevant includes and linker flags is optional,
controlled by the SD_NOTIFY make flag.

Signed-off-by: Apollon Oikonomopoulos <apoikos@debian.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
iser: make membuf size configurable

membuf size is the max size of one rdma buffer used.
The default is still 512 as was but a user can now change it
to 1024 for example to be able to use bigger block sizes.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
iser: add portals support

This adds IPv6 support for iser.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tgt 1.0.48

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sheepdog: turn on cache flag of write request

tgtd doesn't affect semantics of caching, so we can always turn on
cache feature of sheepdog layer.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sheepdog: update layout of inode object header

This change doesn't affect behavior of sheepdog driver. Just for
documentation purpose.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
sheepdog: add documentation

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bs_ssc: remove unused variables

The variables, transfer_length and residue are never used in the
function tape_rdwr_request()

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bs_rbd: fix error assignment in if condition

The statement

if ((x == f()) < 0) {}

is strange. I think it should be

if ((x = f()) < 0) {}

For the reasone of coding style, I modify it as

x = f();
if (x < 0) {}

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
bs_rdb: Add virsecretuuid && cephx_key

Allow passing either a libvirt secret UUID, or a cephx_key to --bsopts. Options are
conflicting, so error if both options given. This allows one to do this:

--bsopts="conf=/etc/ceph/ceph.conf;id=cephx_user;virsecretuuid=$MY_LIBVIRT_SECRET_UUID"
-OR-
--bsopts="conf=/etc/ceph/ceph.conf;id=cephx_user;cephx_key=$MY_KEY"

Signed-off-by: Scott Sullivan <ssullivan@liquidweb.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>