* [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
@ 2016-02-25 17:12 Laura Abbott
2016-02-25 18:48 ` Manuel Lauss
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Laura Abbott @ 2016-02-25 17:12 UTC (permalink / raw)
To: Tejun Heo, Manuel Lauss; +Cc: linux-ide, Linux Kernel Mailing List
Hi,
We received a bugzilla report https://bugzilla.redhat.com/show_bug.cgi?id=1310682
of partitions being automounted unexpectedly. Testing showed that
8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable") was responsible.
This seems to be classified as 'breaking' userspace given that this behavior results
in partitions that were previously unmounted now being being mounted unwanted
automatically which is unwanted behavior for the user. Can we revert this patch or
give a fix to change this behavior?
Thanks,
Laura
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-25 17:12 [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior Laura Abbott
@ 2016-02-25 18:48 ` Manuel Lauss
2016-02-25 18:56 ` Manuel Lauss
2016-02-25 19:09 ` Manuel Lauss
2 siblings, 0 replies; 8+ messages in thread
From: Manuel Lauss @ 2016-02-25 18:48 UTC (permalink / raw)
To: Laura Abbott; +Cc: Tejun Heo, Linux-IDE, Linux Kernel Mailing List
On Thu, Feb 25, 2016 at 6:12 PM, Laura Abbott <labbott@redhat.com> wrote:
> Hi,
>
> We received a bugzilla report
> https://bugzilla.redhat.com/show_bug.cgi?id=1310682
> of partitions being automounted unexpectedly. Testing showed that
> 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable") was
> responsible.
> This seems to be classified as 'breaking' userspace given that this behavior
> results
> in partitions that were previously unmounted now being being mounted
> unwanted
> automatically which is unwanted behavior for the user. Can we revert this
> patch or
> give a fix to change this behavior?
This patch doesn't cause esata disks to be automounted on my distro (gentoo),
it just let's them appear in KDE's removable device widget for me
to mount it at a klick's notice.
I'm not convinced this is a "breaking userspace" problem.
Manuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-25 17:12 [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior Laura Abbott
2016-02-25 18:48 ` Manuel Lauss
@ 2016-02-25 18:56 ` Manuel Lauss
2016-02-25 19:37 ` Laura Abbott
2016-02-25 19:09 ` Manuel Lauss
2 siblings, 1 reply; 8+ messages in thread
From: Manuel Lauss @ 2016-02-25 18:56 UTC (permalink / raw)
To: Laura Abbott; +Cc: Tejun Heo, Linux-IDE, Linux Kernel Mailing List
On Thu, Feb 25, 2016 at 6:12 PM, Laura Abbott <labbott@redhat.com> wrote:
> Hi,
>
> We received a bugzilla report
> https://bugzilla.redhat.com/show_bug.cgi?id=1310682
> of partitions being automounted unexpectedly. Testing showed that
> 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable") was
> responsible.
> This seems to be classified as 'breaking' userspace given that this behavior
> results
> in partitions that were previously unmounted now being being mounted
> unwanted
> automatically which is unwanted behavior for the user. Can we revert this
> patch or
> give a fix to change this behavior?
Do the affected users have sata ports set to hotplug capable? Because that's
what the patch does: it flags ports which have the hotplug capability enabled
as "removable", and I guess redhat just automounts anything that is flagged
as a removable disk (like an usb drive).
Manuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-25 17:12 [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior Laura Abbott
2016-02-25 18:48 ` Manuel Lauss
2016-02-25 18:56 ` Manuel Lauss
@ 2016-02-25 19:09 ` Manuel Lauss
2016-02-26 1:49 ` Laura Abbott
2 siblings, 1 reply; 8+ messages in thread
From: Manuel Lauss @ 2016-02-25 19:09 UTC (permalink / raw)
To: Laura Abbott; +Cc: Tejun Heo, Linux-IDE, Linux Kernel Mailing List
On Thu, Feb 25, 2016 at 6:12 PM, Laura Abbott <labbott@redhat.com> wrote:
> Hi,
>
> We received a bugzilla report
> https://bugzilla.redhat.com/show_bug.cgi?id=1310682
> of partitions being automounted unexpectedly. Testing showed that
> 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable") was
> responsible.
> This seems to be classified as 'breaking' userspace given that this behavior
> results
> in partitions that were previously unmounted now being being mounted
> unwanted
> automatically which is unwanted behavior for the user. Can we revert this
> patch or
> give a fix to change this behavior?
Can you test this? I think the old HPCP bit should just be ignored,
although windows does use it, i.e. when I enable hotplug capability
in the bios on my desktop it shows the "eject device" icon for a device
attached to the port on the motherboard, we probably can ignore it
on linux to not break all automounting distros. On my laptop, where
I care about this, it still works as intended.
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 4029679..e029e3c 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1164,8 +1164,7 @@ static void ahci_port_init(struct device *dev,
struct ata_port *ap,
/* mark esata ports */
tmp = readl(port_mmio + PORT_CMD);
- if ((tmp & PORT_CMD_HPCP) ||
- ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)))
+ if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS))
ap->pflags |= ATA_PFLAG_EXTERNAL;
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-25 18:56 ` Manuel Lauss
@ 2016-02-25 19:37 ` Laura Abbott
2016-02-25 21:20 ` Tejun Heo
0 siblings, 1 reply; 8+ messages in thread
From: Laura Abbott @ 2016-02-25 19:37 UTC (permalink / raw)
To: Manuel Lauss; +Cc: Tejun Heo, Linux-IDE, Linux Kernel Mailing List
On 02/25/2016 10:56 AM, Manuel Lauss wrote:
> On Thu, Feb 25, 2016 at 6:12 PM, Laura Abbott <labbott@redhat.com> wrote:
>> Hi,
>>
>> We received a bugzilla report
>> https://bugzilla.redhat.com/show_bug.cgi?id=1310682
>> of partitions being automounted unexpectedly. Testing showed that
>> 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable") was
>> responsible.
>> This seems to be classified as 'breaking' userspace given that this behavior
>> results
>> in partitions that were previously unmounted now being being mounted
>> unwanted
>> automatically which is unwanted behavior for the user. Can we revert this
>> patch or
>> give a fix to change this behavior?
>
> Do the affected users have sata ports set to hotplug capable? Because that's
> what the patch does: it flags ports which have the hotplug capability enabled
> as "removable", and I guess redhat just automounts anything that is flagged
> as a removable disk (like an usb drive).
>
> Manuel
>
The mounting comes from udisks. udisks will automount anything marked as removable
unless explicitly forbidden. You can argue whether or not this is good design but
it's still a change in behavior from what udisks was relying on to decide
whether or not to automount. lspci from the users hardware:
00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset 6-Port SATA
AHCI Controller (rev 06)
I'll make a build with the patch you gave for testing.
Thanks,
Laura
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-25 19:37 ` Laura Abbott
@ 2016-02-25 21:20 ` Tejun Heo
0 siblings, 0 replies; 8+ messages in thread
From: Tejun Heo @ 2016-02-25 21:20 UTC (permalink / raw)
To: Laura Abbott; +Cc: Manuel Lauss, Linux-IDE, Linux Kernel Mailing List
Hello, Laura.
On Thu, Feb 25, 2016 at 11:37:09AM -0800, Laura Abbott wrote:
> The mounting comes from udisks. udisks will automount anything marked as removable
> unless explicitly forbidden. You can argue whether or not this is good design but
> it's still a change in behavior from what udisks was relying on to decide
> whether or not to automount. lspci from the users hardware:
>
> 00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset 6-Port SATA
> AHCI Controller (rev 06)
It is a behavior change but difficult to characterize as a breakage,
given that we do want userland to treat ports explicitly marked as
external to be treated as such. That said, eSATA being mostly a
fringe thing, we can go "whatever" and revert it.
Let's hope it's a false positive that the patch can fix.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-25 19:09 ` Manuel Lauss
@ 2016-02-26 1:49 ` Laura Abbott
2016-02-27 13:08 ` Tejun Heo
0 siblings, 1 reply; 8+ messages in thread
From: Laura Abbott @ 2016-02-26 1:49 UTC (permalink / raw)
To: Manuel Lauss; +Cc: Tejun Heo, Linux-IDE, Linux Kernel Mailing List
On 02/25/2016 11:09 AM, Manuel Lauss wrote:
> On Thu, Feb 25, 2016 at 6:12 PM, Laura Abbott <labbott@redhat.com> wrote:
>> Hi,
>>
>> We received a bugzilla report
>> https://bugzilla.redhat.com/show_bug.cgi?id=1310682
>> of partitions being automounted unexpectedly. Testing showed that
>> 8a3e33cf92c7 ("ata: ahci: find eSATA ports and flag them as removable") was
>> responsible.
>> This seems to be classified as 'breaking' userspace given that this behavior
>> results
>> in partitions that were previously unmounted now being being mounted
>> unwanted
>> automatically which is unwanted behavior for the user. Can we revert this
>> patch or
>> give a fix to change this behavior?
>
> Can you test this? I think the old HPCP bit should just be ignored,
> although windows does use it, i.e. when I enable hotplug capability
> in the bios on my desktop it shows the "eject device" icon for a device
> attached to the port on the motherboard, we probably can ignore it
> on linux to not break all automounting distros. On my laptop, where
> I care about this, it still works as intended.
>
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index 4029679..e029e3c 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
> @@ -1164,8 +1164,7 @@ static void ahci_port_init(struct device *dev,
> struct ata_port *ap,
>
> /* mark esata ports */
> tmp = readl(port_mmio + PORT_CMD);
> - if ((tmp & PORT_CMD_HPCP) ||
> - ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)))
> + if ((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS))
> ap->pflags |= ATA_PFLAG_EXTERNAL;
> }
>
At least one user reported that this fixed the issue and he said
you could add
Tested-by: Bob Schultz <bob@engineer.com>
Thanks,
Laura
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior
2016-02-26 1:49 ` Laura Abbott
@ 2016-02-27 13:08 ` Tejun Heo
0 siblings, 0 replies; 8+ messages in thread
From: Tejun Heo @ 2016-02-27 13:08 UTC (permalink / raw)
To: Laura Abbott; +Cc: Manuel Lauss, Linux-IDE, Linux Kernel Mailing List
Hello,
On Thu, Feb 25, 2016 at 05:49:34PM -0800, Laura Abbott wrote:
> At least one user reported that this fixed the issue and he said
> you could add
>
> Tested-by: Bob Schultz <bob@engineer.com>
Great, Manuel, can you please send a proper patch?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-27 13:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25 17:12 [REGRESSION] 8a3e33cf92c7 "ata: ahci: find eSATA ports and flag them as removable" changes userspace behavior Laura Abbott
2016-02-25 18:48 ` Manuel Lauss
2016-02-25 18:56 ` Manuel Lauss
2016-02-25 19:37 ` Laura Abbott
2016-02-25 21:20 ` Tejun Heo
2016-02-25 19:09 ` Manuel Lauss
2016-02-26 1:49 ` Laura Abbott
2016-02-27 13:08 ` Tejun Heo
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).