Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

[OT] Getting error when using FSCTL_FILE_LEVEL_TRIM

Pavel_APavel_A Member Posts: 2,659
Thanks, Mark.

So, which driver is responsible for passing the trim command all the
way down to the disk?

Also, when BIOS has native ACHI and IDE modes for SATA, is the former
better for the "trim" things to work?
Or, if nothing in Win7 is aware of "trim", is some driver needed from
the SSD vendor? I have not seen anything of this sort for my SSD.

Regards,
-- pa

On 14-May-2012 22:15, Mark Roddy wrote:
> It is in Win7. I have no idea about win8. Neither scsiport nor
> storport know/knew what to do with it.
>
> Mark Roddy
>
>
> On Mon, May 14, 2012 at 3:06 PM, Pavel A<xxxxx@fastmail.fm> wrote:
>> Apologize for jumping in.
>>
>> Is an ACHI driver really needed in order to pass the trim command?
>> The MSDN link does not say this.
>>
>> Thanks,
>> -- pa
>>
>>
>> On 14-May-2012 21:49, Mark Roddy wrote:
>>>
>>>
>>> http://msdn.microsoft.com/en-us/library/windows/desktop/hh447306(v=vs.85).aspx
>>>
>>> Gives the user mode access using DeviceIoControl. However, as has been
>>> explained to the OP over on the windows forum, this command will only
>>> work on disks that support it (SSD) using port drivers that know what
>>> to do with it (AHCI).
>>>
>>>
>>> Mark Roddy

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 12,914
    Pavel A wrote:
    > So, which driver is responsible for passing the trim command all the
    > way down to the disk?

    This is not a disk command, this is a file system command. Isn't it?

    --
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Pavel_APavel_A Member Posts: 2,659
    On 17-May-2012 19:44, Tim Roberts wrote:
    > Pavel A wrote:
    >> So, which driver is responsible for passing the trim command all the
    >> way down to the disk?
    >
    > This is not a disk command, this is a file system command. Isn't it?


    Yep. It is. It has to be translated to something understandable by the SSD.
    Is this translation affected by how the disk controller presents itself
    the the OS: IDE or AHCI? Will SSD degrade quickly under WinXP (it does
    not send "trims")?

    Thanks,
    -- pa
  • Tung_Yang_JoeTung_Yang_Joe Member Posts: 21
    The AHCI driver is responsible to it.
    And if you want your os support NCQ or trim command, you need to change the sata mode to ahci on BIOS.
    BTW,windows supported trim command since win7.--referenced on wiki
  • Pavel_APavel_A Member Posts: 2,659
    <xxxxx@gmail.com> wrote in message news:xxxxx@ntdev...
    > The AHCI driver is responsible to it.
    > And if you want your os support NCQ or trim command, you need to change
    > the sata mode to ahci on BIOS.
    > BTW,windows supported trim command since win7.--referenced on wiki

    Thank you! Will then reinstall my Win8 in AHCI mode
    (hoped that it would automagicaly pick up the boot volume after the
    mode change... alas, it fails exactly like its predecessors).

    -- pa
  • Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
    > Thank you! Will then reinstall my Win8 in AHCI mode

    Also install Intel Matrix driver for this, since MS's AHCI driver is buggy and has the same bug _for years since Vista gold_ with no one to fix it.

    It has a race in register access, which causes the whole controller to hang and be recovered from it only by timeout of something like 30 seconds.

    Also, the MS's KB is aware about this bug, but suggests no new driver binary to be downloaded! the morons which created the article want you to email them with a moronic question about "why do you need this fix?", and these emails are never responded to.

    It's amazing that the well-known bug persists for years without being fixed.

    So, without vendor's (like Intel's) driver, Windows does not support AHCI.

    There were times when IAA (predecessor of Intel Matrix) was buggy and caused crashes in PnP paths, but, for now, I'm using it for ~2 years on several machines and have no problems.

    --
    Maxim S. Shatskih
    Windows DDK MVP
    xxxxx@storagecraft.com
    http://www.storagecraft.com
  • Pavel_APavel_A Member Posts: 2,659
    Thank you Maxim too. This time it is an AMD machine, so will search there.
    Let's not offend the fine support folks.... it probably was just a case of
    "preliminary outsourcing" both in MS and Intel :-(
    -- pa

    "Maxim S. Shatskih" <xxxxx@storagecraft.com> wrote in message
    news:xxxxx@ntdev...
    >> Thank you! Will then reinstall my Win8 in AHCI mode
    >
    > Also install Intel Matrix driver for this, since MS's AHCI driver is buggy
    > and has the same bug _for years since Vista gold_ with no one to fix it.
    >
    > It has a race in register access, which causes the whole controller to
    > hang and be recovered from it only by timeout of something like 30
    > seconds.
    >
    > Also, the MS's KB is aware about this bug, but suggests no new driver
    > binary to be downloaded! the morons which created the article want you to
    > email them with a moronic question about "why do you need this fix?", and
    > these emails are never responded to.
    >
    > It's amazing that the well-known bug persists for years without being
    > fixed.
    >
    > So, without vendor's (like Intel's) driver, Windows does not support AHCI.
    >
    > There were times when IAA (predecessor of Intel Matrix) was buggy and
    > caused crashes in PnP paths, but, for now, I'm using it for ~2 years on
    > several machines and have no problems.
    >
    > --
    > Maxim S. Shatskih
    > Windows DDK MVP
    > xxxxx@storagecraft.com
    > http://www.storagecraft.com
    >
    >
  • Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
    > "preliminary outsourcing" both in MS and Intel :-(

    msahci.sys is not Intel's and is provided in WDK samples.

    Some people _do fix this bug_ in msahci from source and then install their own binary, bypassing the cert checks by SetupDi via ImagePath registry.

    --
    Maxim S. Shatskih
    Windows DDK MVP
    xxxxx@storagecraft.com
    http://www.storagecraft.com
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 25 Feb 2019 OSR Seminar Space
Developing Minifilters 8 April 2019 OSR Seminar Space