History log of /freebsd-10-stable/usr.sbin/ctladm/ctladm.c
Revision Date Author Comments
# 316253 30-Mar-2017 ngie

MFC r316050,r316051:

r316050:

ctld: sort #includes per style(9)

- Only include sys/types.h or sys/param.h, not both.
- Sort alphabetically.

r316051:

ctldadm: sort #includes per style(9)

- Only include sys/types.h or sys/param.h, not both.
- Sort alphabetically.


# 288805 05-Oct-2015 mav

MFC r288259: Remove some duplicate, legacy, dead and questionable code.


# 288731 05-Oct-2015 mav

MFC r287620: Remove unused target and initiator IDs.


# 288728 05-Oct-2015 mav

MFC r287500: Allow LUN options modification via CTL_LUNREQ_MODIFY.

Not all changes take effect, but that is a different question.


# 288726 05-Oct-2015 mav

MFC r287455, r287458, r287459: Remove some dead code.


# 288719 05-Oct-2015 mav

MFC r286806: Drop "internal" CTL frontend.

Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places.


# 285929 28-Jul-2015 bapt

make ctdladm(8) return 0 is everything was ok.

retval is used to test the return of XML_Parse function which is ok if 1 is
returned and retval it directly returned to the main function and used as an
exit value.

if all the parsing part is done reset retval to 0 so that the command return 0
if everything ok

Differential Revision: https://reviews.freebsd.org/D3102
Reviewed by: trasz
Sponsored by: gandi.net


# 282956 15-May-2015 trasz

MFC r278316:

Make "ctladm islist" ignore unknown elements, so the old version
continues to work with newer kernel.

Other ctladm(8) "*list" subcommands seem to already handle it in
a reasonable way.

Sponsored by: The FreeBSD Foundation


# 279003 19-Feb-2015 mav

MFC r278161: Bring some more order into iSCSI portal group tags support.

While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.

Sponsored by: iXsystems, Inc.


# 279002 19-Feb-2015 mav

MFC r278037: CTL LUN mapping rewrite.

Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports. By default all ports are created without LUN mapping, exposing all
CTL LUNs as before. But, if needed, LUN mapping can be manually set on
per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.

Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition. LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed. It
allows same LUN to be exposed several times via multiple targets.

While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.

Relnotes: yes
Sponsored by: iXsystems, Inc.


# 276139 23-Dec-2014 mav

MFC r275959: Report initiator id in portlist XML in more formalized way.


# 276138 23-Dec-2014 mav

MFC r275958: Report XML parsing errors.


# 274870 22-Nov-2014 trasz

MFC r273464:

Whitespace fixes.

Sponsored by: The FreeBSD Foundation


# 273320 20-Oct-2014 mav

MFC r272978: Improve and document `ctladm portlist` subcommand.

Make this subcommand less FC-specific, reporting target and port addresses
in more generic way. Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.


# 273315 20-Oct-2014 mav

MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands. If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.


# 269070 24-Jul-2014 mav

MFC r268289:
Fix minor copy-paste bug in r268284.


# 268694 15-Jul-2014 mav

MFC r268363:
Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.


# 268679 15-Jul-2014 mav

MFC r268284:
Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far. Garbage-collect it later.


# 257540 02-Nov-2013 trasz

MFC r257379:

Rename '-h' option to '-p', and use "portal" instead of "host" or "address",
in order to be consistent with iSCSI terminology. Besides, calling the
option '-h' was just wrong.

This changes usage for newly added iscsictl(8), and two newly added
subcommands to ctladm(8). This breaks POLA between CURRENT and 10,
but since 10.0 has not been released yet, it's still ok to do.

MFC r257380:

Bump .Dd after r257379.

Approved by: re (glebius)
Sponsored by: The FreeBSD Foundation


# 288805 05-Oct-2015 mav

MFC r288259: Remove some duplicate, legacy, dead and questionable code.


# 288731 05-Oct-2015 mav

MFC r287620: Remove unused target and initiator IDs.


# 288728 05-Oct-2015 mav

MFC r287500: Allow LUN options modification via CTL_LUNREQ_MODIFY.

Not all changes take effect, but that is a different question.


# 288726 05-Oct-2015 mav

MFC r287455, r287458, r287459: Remove some dead code.


# 288719 05-Oct-2015 mav

MFC r286806: Drop "internal" CTL frontend.

Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places.


# 285929 28-Jul-2015 bapt

make ctdladm(8) return 0 is everything was ok.

retval is used to test the return of XML_Parse function which is ok if 1 is
returned and retval it directly returned to the main function and used as an
exit value.

if all the parsing part is done reset retval to 0 so that the command return 0
if everything ok

Differential Revision: https://reviews.freebsd.org/D3102
Reviewed by: trasz
Sponsored by: gandi.net


# 282956 15-May-2015 trasz

MFC r278316:

Make "ctladm islist" ignore unknown elements, so the old version
continues to work with newer kernel.

Other ctladm(8) "*list" subcommands seem to already handle it in
a reasonable way.

Sponsored by: The FreeBSD Foundation


# 279003 19-Feb-2015 mav

MFC r278161: Bring some more order into iSCSI portal group tags support.

While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.

Sponsored by: iXsystems, Inc.


# 279002 19-Feb-2015 mav

MFC r278037: CTL LUN mapping rewrite.

Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports. By default all ports are created without LUN mapping, exposing all
CTL LUNs as before. But, if needed, LUN mapping can be manually set on
per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.

Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition. LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed. It
allows same LUN to be exposed several times via multiple targets.

While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.

Relnotes: yes
Sponsored by: iXsystems, Inc.


# 276139 23-Dec-2014 mav

MFC r275959: Report initiator id in portlist XML in more formalized way.


# 276138 23-Dec-2014 mav

MFC r275958: Report XML parsing errors.


# 274870 22-Nov-2014 trasz

MFC r273464:

Whitespace fixes.

Sponsored by: The FreeBSD Foundation


# 273320 20-Oct-2014 mav

MFC r272978: Improve and document `ctladm portlist` subcommand.

Make this subcommand less FC-specific, reporting target and port addresses
in more generic way. Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.


# 273315 20-Oct-2014 mav

MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands. If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.


# 269070 24-Jul-2014 mav

MFC r268289:
Fix minor copy-paste bug in r268284.


# 268694 15-Jul-2014 mav

MFC r268363:
Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.


# 268679 15-Jul-2014 mav

MFC r268284:
Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far. Garbage-collect it later.


# 257540 02-Nov-2013 trasz

MFC r257379:

Rename '-h' option to '-p', and use "portal" instead of "host" or "address",
in order to be consistent with iSCSI terminology. Besides, calling the
option '-h' was just wrong.

This changes usage for newly added iscsictl(8), and two newly added
subcommands to ctladm(8). This breaks POLA between CURRENT and 10,
but since 10.0 has not been released yet, it's still ok to do.

MFC r257380:

Bump .Dd after r257379.

Approved by: re (glebius)
Sponsored by: The FreeBSD Foundation