linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wangyijing <wangyijing@huawei.com>
To: dan.j.williams@intel.com, Praveen Murali <pmurali@logicube.com>
Cc: linux-scsi@vger.kernel.org
Subject: Question for Patch"libsas: fix "sysfs group not found" warnings at port teardown time"
Date: Fri, 5 Feb 2016 17:20:03 +0800	[thread overview]
Message-ID: <56B46943.5040808@huawei.com> (raw)

Hi Dan and Praveen,
   I found a patch titled "libsas: fix "sysfs group not found" warnings at port teardown time" by google,
https://www.mail-archive.com/linux-scsi@vger.kernel.org/msg39187.html

I found the same warning calltrace in my platform, but I didn't find the patch changes in the latest kernel 4.5-rc2.
So is this issue still in kernel ?

I think your patch could fix this issue we found, but I'm worried about another problem.

Now when unplug a disk

LLDD report a event loss_of_singal
    sas_deform_port
	sas_unregister_domain_devices
		sas_unregister_dev
			sas_discover_event(dev->port, DISCE_DESTRUCT);
	sas_port_delete
	phy->port = NULL;

and after your patch changes

LLDD report a event loss_of_singal
	sas_deform_port
		sas_unregister_domain_devices
			sas_unregister_dev
				sas_discover_event(dev->port, DISCE_DESTRUCT);
	phy->port = NULL;

...
	sas_destruct_devices
		sas_port_delete   //now we actually delete the port device, but we set 	phy->port = NULL;  before this time.


So if we hotplug the disk quickly, plug,unplug,plug,
The new dmaed event(plug) would try to alloc and add a new port, but the old port device is still alive.
Another calltrace would occur

WARNING: CPU: 0 PID: 1038 at lib/kobject.c:240 kobject_add_internal+0x258/0x318()
kobject_add_internal failed for port-0:0 with -EEXIST, don't try to register things with the same name in the same directory.
CPU: 0 PID: 1038 Comm: kworker/u64:2 Tainted: G        W       4.1.6+ #140
[<ffff800000089918>] dump_backtrace+0x0/0x124
[<ffff800000089a4c>] show_stack+0x10/0x1c
[<ffff80000009fcbc>] warn_slowpath_fmt+0x4c/0x58
[<ffff8000003cdc04>] device_add+0x28c/0x5b8
[<ffff80000040d4ec>] sas_port_add+0x20/0xbc
[<ffff80000040f3e8>] sas_porte_bytes_dmaed
[<ffff8000000b5504>] process_one_work+0x13c/0x344

Because I am not a sas guy, so if you could comment this or post new patch, I would be thanks a lot!

Thanks!
Yijing.




             reply	other threads:[~2016-02-05  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  9:20 wangyijing [this message]
2016-02-05 21:33 ` Question for Patch"libsas: fix "sysfs group not found" warnings at port teardown time" Praveen Murali
2016-02-06  1:26   ` wangyijing
2016-02-08 17:20   ` John Garry
  -- strict thread matches above, loose matches on Subject: below --
2016-02-05 17:22 Dāvis Mosāns
2016-02-06  1:20 ` wangyijing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B46943.5040808@huawei.com \
    --to=wangyijing@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pmurali@logicube.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).