Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163421617
D51782.id159940.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D51782.id159940.diff
View Options
diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh
--- a/usr.sbin/ctld/ctld.hh
+++ b/usr.sbin/ctld/ctld.hh
@@ -219,6 +219,7 @@
bool set_dscp(u_int dscp);
virtual bool set_filter(const char *str) = 0;
void set_foreign();
+ void set_kernel();
bool set_offload(const char *offload);
bool set_pcp(u_int pcp);
bool set_redirection(const char *addr);
@@ -247,6 +248,7 @@
enum discovery_filter pg_discovery_filter =
discovery_filter::UNKNOWN;
bool pg_foreign = false;
+ bool pg_kernel = false;
bool pg_assigned = false;
std::list<portal_up> pg_portals;
std::unordered_map<std::string, port *> pg_ports;
diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc
--- a/usr.sbin/ctld/ctld.cc
+++ b/usr.sbin/ctld/ctld.cc
@@ -594,6 +594,8 @@
bool
portal_group::is_dummy() const
{
+ if (pg_kernel)
+ return (false);
if (pg_foreign)
return (true);
if (pg_portals.empty())
@@ -710,6 +712,12 @@
pg_foreign = true;
}
+void
+portal_group::set_kernel()
+{
+ pg_kernel = true;
+}
+
bool
portal_group::set_offload(const char *offload)
{
diff --git a/usr.sbin/ctld/kernel.cc b/usr.sbin/ctld/kernel.cc
--- a/usr.sbin/ctld/kernel.cc
+++ b/usr.sbin/ctld/kernel.cc
@@ -483,6 +483,8 @@
log_warnx("Failed to add portal-group \"%s\"", pg_name);
return;
}
+
+ pg->set_kernel();
}
pg->set_tag(port.cfiscsi_portal_group_tag);
if (!conf->add_port(targ, pg, port.port_id)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 1:58 AM (2 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35424499
Default Alt Text
D51782.id159940.diff (1 KB)
Attached To
Mode
D51782: ctld: kernel-sourced portal groups are not dummies
Attached
Detach File
Event Timeline
Log In to Comment