[PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled - Kernel

This is a discussion on [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled - Kernel ; Hi When ata_scsi_scan_host() scan device failed, it will start a work queue unconditionally. This may cause some noisy messages. This patch fix this problem. --- commit 6c686a6814a805782c7ab48ad89352ee309e8c32 Author: Chunbo Luo Date: Fri Jun 27 09:56:52 2008 +0800 libata-scsi: Don't start ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled

  1. [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled

    Hi

    When ata_scsi_scan_host() scan device failed, it will start a work queue
    unconditionally. This may cause some noisy messages. This patch fix this
    problem.


    ---
    commit 6c686a6814a805782c7ab48ad89352ee309e8c32
    Author: Chunbo Luo
    Date: Fri Jun 27 09:56:52 2008 +0800

    libata-scsi: Don't start hotplug work queue if hotplug is disabled

    Previously, queue_delayed_work() was started unconditionally, but if
    ATA_PFLAG_SCSI_HOTPLUG is not set and we do this, the work queue may
    cause multiple messages like this:

    ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.

    So now,it is only started when the hotplug flag is actually set.

    Signed-off-by: Chunbo Luo

    diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
    index 57a4364..7ed5bb3 100644
    --- a/drivers/ata/libata-scsi.c
    +++ b/drivers/ata/libata-scsi.c
    @@ -3108,8 +3108,9 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
    " switching to async\n");
    }

    - queue_delayed_work(ata_aux_wq, &ap->hotplug_task,
    - round_jiffies_relative(HZ));
    + if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG)
    + queue_delayed_work(ata_aux_wq, &ap->hotplug_task,
    + round_jiffies_relative(HZ));
    }

    /**
    ---


    Best Regards
    Chunbo
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled

    Chunbo Luo wrote:
    > Hi
    >
    > When ata_scsi_scan_host() scan device failed, it will start a work queue
    > unconditionally. This may cause some noisy messages. This patch fix this
    > problem.


    ATA_PFLAG_SCSI_HOTPLUG doesn't mean that hotplug is enabled. It
    indicates that EH needs to schedule a kick at SCSI's ass and make it
    scan for discovered devices && work running on ata_aux_wq testing it
    doesn't mean anything. There's no synchronization.

    > Previously, queue_delayed_work() was started unconditionally, but if
    > ATA_PFLAG_SCSI_HOTPLUG is not set and we do this, the work queue may
    > cause multiple messages like this:
    >
    > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.


    And this message has nothing to do with SCSI. It's printed by libata
    proper for several drivers which don't support ATAPI. Did the patch
    really kill the warning messages? Can you please post full boot log
    from 2.6.26 w/o the patch?

    Andrew, please drop the patch from -mm. Thanks.

    --
    tejun
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled

    On Fri, 2008-07-18 at 22:33 +0900, Tejun Heo wrote:
    > Chunbo Luo wrote:
    > > Hi
    > >
    > > When ata_scsi_scan_host() scan device failed, it will start a work queue
    > > unconditionally. This may cause some noisy messages. This patch fix this
    > > problem.

    >
    > ATA_PFLAG_SCSI_HOTPLUG doesn't mean that hotplug is enabled. It
    > indicates that EH needs to schedule a kick at SCSI's ass and make it
    > scan for discovered devices && work running on ata_aux_wq testing it
    > doesn't mean anything. There's no synchronization.
    >
    > > Previously, queue_delayed_work() was started unconditionally, but if
    > > ATA_PFLAG_SCSI_HOTPLUG is not set and we do this, the work queue may
    > > cause multiple messages like this:
    > >
    > > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.

    >
    > And this message has nothing to do with SCSI. It's printed by libata
    > proper for several drivers which don't support ATAPI. Did the patch
    > really kill the warning messages? Can you please post full boot log
    > from 2.6.26 w/o the patch?


    If the drivers don't support ATAPI, the hotplug task cannot find linked device,
    and it will start the hotplug task again. Which will print messages continously
    like this.

    ----------
    ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    ....
    ------------

    We should find a way to avoid this kind of noisy warning messages.

    This patch cannot kill the warning messages, but it can avoid the
    duplicate warning messages.




    >
    > Andrew, please drop the patch from -mm. Thanks.
    >

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled

    Chunbo Luo wrote:
    >> And this message has nothing to do with SCSI. It's printed by libata
    >> proper for several drivers which don't support ATAPI. Did the patch
    >> really kill the warning messages? Can you please post full boot log
    >> from 2.6.26 w/o the patch?

    >
    > If the drivers don't support ATAPI, the hotplug task cannot find linked device,
    > and it will start the hotplug task again. Which will print messages continously
    > like this.
    >
    > ----------
    > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > ...
    > ------------
    >
    > We should find a way to avoid this kind of noisy warning messages.
    >
    > This patch cannot kill the warning messages, but it can avoid the
    > duplicate warning messages.


    Hmmm... yeah, indeed. That check is located at rather strange place.
    Can you please test the attached patch?

    Thanks.

    --
    tejun


  5. Re: [PATCH]: libata-scsi: Don't start hotplug work queue if hotplug is disabled

    On Mon, 2008-07-21 at 13:40 +0900, Tejun Heo wrote:
    > Chunbo Luo wrote:
    > >> And this message has nothing to do with SCSI. It's printed by libata
    > >> proper for several drivers which don't support ATAPI. Did the patch
    > >> really kill the warning messages? Can you please post full boot log
    > >> from 2.6.26 w/o the patch?

    > >
    > > If the drivers don't support ATAPI, the hotplug task cannot find linked device,
    > > and it will start the hotplug task again. Which will print messages continously
    > > like this.
    > >
    > > ----------
    > > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > > ata3.00: WARNING: ATAPI is not supported with this driver, device ignored.
    > > ...
    > > ------------
    > >
    > > We should find a way to avoid this kind of noisy warning messages.
    > >
    > > This patch cannot kill the warning messages, but it can avoid the
    > > duplicate warning messages.

    >
    > Hmmm... yeah, indeed. That check is located at rather strange place.
    > Can you please test the attached patch?


    I tested the attached patch on mpc7448hpc2 ,it worked. It can avoid the
    multiple warning messages.

    Thanks!
    Chunbo
    >
    > Thanks.
    >

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread