lkml.org 
[lkml]   [2004]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Changes to ide-probe.c in 2.6.9-rc2 causing improper detection
    Alan Cox wrote:
    > On Maw, 2004-09-14 at 07:06, Jens Axboe wrote:
    >
    >>Alan, I bet there are a lot of these. Maybe we should consider letting
    >>the user manually flag support for FLUSH_CACHE, at least it is in their
    >>hands then.
    >
    >
    > You are assuming the drive supports "FLUSH_CACHE" just because it
    > doesn't error it. Thats a good way to have accidents.
    >
    > The patch I posted originally did turn wcache off for barrier if no
    > flush cache support was present but had a small bug so that bit got
    > dropped.


    FWIW the libata test for checking whether it is OK to issue a flush is

    return ata_id_wcache_enabled(dev) ||
    ata_id_has_flush(dev) ||
    ata_id_has_flush_ext(dev);

    and if it passes that test,

    if ((tf->flags & ATA_TFLAG_LBA48) &&
    (ata_id_has_flush_ext(qc->dev)))
    tf->command = ATA_CMD_FLUSH_EXT;
    else
    tf->command = ATA_CMD_FLUSH;

    I wouldn't object to removing the "ata_id_wcache_enabled" test if people
    feel that it is unsafe.

    Jeff


    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:06    [W:0.022 / U:154.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site