2011-04-22 00:45:02

by Keith Mannthey

[permalink] [raw]
Subject: Quick EXT4 discard question

Hello,
I am using some Intel SSD drives with 2.6.38.2.


/proc/scsi/scsi identifies them as:

"
Host: scsi4 Channel: 00 Id: 04 Lun: 00
Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
Type: Direct-Access ANSI SCSI revision: 05
"

Sometimes I am see the following messages that indicate discard is
disabled during runtime:

Relevant dmesg:

...
EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
EXT4......

.... (some time later)

EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling

I am new to SSDs and discard is there something else I need to do to
make these drives work as expected?


Thanks,
Keith Mannthey
LTC Local Filesystem



2011-04-22 02:28:16

by Tao Ma

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On 04/22/2011 08:45 AM, Keith Mannthey wrote:
> Hello,
> I am using some Intel SSD drives with 2.6.38.2.
>
>
> /proc/scsi/scsi identifies them as:
>
> "
> Host: scsi4 Channel: 00 Id: 04 Lun: 00
> Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
> Type: Direct-Access ANSI SCSI revision: 05
> "
>
> Sometimes I am see the following messages that indicate discard is
> disabled during runtime:
>
> Relevant dmesg:
>
> ...
> EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
> EXT4......
>
> .... (some time later)
>
> EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
> EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
> EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
> EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
> EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling
Please check whether your ssd works with discard or whether your ssd
firmware has the ability to do so.
I used an SSDSA2M160(I guess you are using the same type as me except
the volume size is 80g, but you have to find it out from intel side) and
after I upgraded my firmware to the new version(you can download it from
intel site), it supports discard now.

Regards,
Tao

2011-04-22 02:44:56

by Keith Mannthey

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On Fri, 2011-04-22 at 10:27 +0800, Tao Ma wrote:
> On 04/22/2011 08:45 AM, Keith Mannthey wrote:
> > Hello,
> > I am using some Intel SSD drives with 2.6.38.2.
> >
> >
> > /proc/scsi/scsi identifies them as:
> >
> > "
> > Host: scsi4 Channel: 00 Id: 04 Lun: 00
> > Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
> > Type: Direct-Access ANSI SCSI revision: 05
> > "
> >
> > Sometimes I am see the following messages that indicate discard is
> > disabled during runtime:
> >
> > Relevant dmesg:
> >
> > ...
> > EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
> > EXT4......
> >
> > .... (some time later)
> >
> > EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
> > EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
> > EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
> > EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
> > EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling
> Please check whether your ssd works with discard or whether your ssd
> firmware has the ability to do so.
> I used an SSDSA2M160(I guess you are using the same type as me except
> the volume size is 80g, but you have to find it out from intel side) and
> after I upgraded my firmware to the new version(you can download it from
> intel site), it supports discard now.


Firmware is up to date as of a few weeks ago. It is 02M3 which still
looks to be the current version.

Thanks,
Keith


2011-04-22 02:53:55

by Tao Ma

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On 04/22/2011 10:44 AM, Keith Mannthey wrote:
> On Fri, 2011-04-22 at 10:27 +0800, Tao Ma wrote:
>> On 04/22/2011 08:45 AM, Keith Mannthey wrote:
>>> Hello,
>>> I am using some Intel SSD drives with 2.6.38.2.
>>>
>>>
>>> /proc/scsi/scsi identifies them as:
>>>
>>> "
>>> Host: scsi4 Channel: 00 Id: 04 Lun: 00
>>> Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
>>> Type: Direct-Access ANSI SCSI revision: 05
>>> "
>>>
>>> Sometimes I am see the following messages that indicate discard is
>>> disabled during runtime:
>>>
>>> Relevant dmesg:
>>>
>>> ...
>>> EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
>>> EXT4......
>>>
>>> .... (some time later)
>>>
>>> EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
>>> EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
>>> EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
>>> EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
>>> EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling
>> Please check whether your ssd works with discard or whether your ssd
>> firmware has the ability to do so.
>> I used an SSDSA2M160(I guess you are using the same type as me except
>> the volume size is 80g, but you have to find it out from intel side) and
>> after I upgraded my firmware to the new version(you can download it from
>> intel site), it supports discard now.
>
>
> Firmware is up to date as of a few weeks ago. It is 02M3 which still
> looks to be the current version.
ok...
So please check whether your device supports discard or not.
Intel has a tool named Intel SSD Toolbox, and it can check the status of
your ssd, but the bad thing is that it seems to only have a windows
version...

Regards,
Tao

2011-04-22 07:45:11

by Lukas Czerner

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On Fri, 22 Apr 2011, Tao Ma wrote:

> On 04/22/2011 10:44 AM, Keith Mannthey wrote:
> > On Fri, 2011-04-22 at 10:27 +0800, Tao Ma wrote:
> >> On 04/22/2011 08:45 AM, Keith Mannthey wrote:
> >>> Hello,
> >>> I am using some Intel SSD drives with 2.6.38.2.
> >>>
> >>>
> >>> /proc/scsi/scsi identifies them as:
> >>>
> >>> "
> >>> Host: scsi4 Channel: 00 Id: 04 Lun: 00
> >>> Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
> >>> Type: Direct-Access ANSI SCSI revision: 05
> >>> "
> >>>
> >>> Sometimes I am see the following messages that indicate discard is
> >>> disabled during runtime:
> >>>
> >>> Relevant dmesg:
> >>>
> >>> ...
> >>> EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
> >>> EXT4......
> >>>
> >>> .... (some time later)
> >>>
> >>> EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
> >>> EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
> >>> EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
> >>> EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
> >>> EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling
> >> Please check whether your ssd works with discard or whether your ssd
> >> firmware has the ability to do so.
> >> I used an SSDSA2M160(I guess you are using the same type as me except
> >> the volume size is 80g, but you have to find it out from intel side) and
> >> after I upgraded my firmware to the new version(you can download it from
> >> intel site), it supports discard now.
> >
> >
> > Firmware is up to date as of a few weeks ago. It is 02M3 which still
> > looks to be the current version.
> ok...
> So please check whether your device supports discard or not.
> Intel has a tool named Intel SSD Toolbox, and it can check the status of
> your ssd, but the bad thing is that it seems to only have a windows
> version...

Actually you can query that with hdparm -I /path/to/the/device and you
should see something like

* Data Set Management TRIM supported

in the output.

Thanks!
-Lukas

>
> Regards,
> Tao
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

2011-04-22 08:32:04

by Tao Ma

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On 04/22/2011 03:44 PM, Lukas Czerner wrote:
> On Fri, 22 Apr 2011, Tao Ma wrote:
>
>> On 04/22/2011 10:44 AM, Keith Mannthey wrote:
>>> On Fri, 2011-04-22 at 10:27 +0800, Tao Ma wrote:
>>>> On 04/22/2011 08:45 AM, Keith Mannthey wrote:
>>>>> Hello,
>>>>> I am using some Intel SSD drives with 2.6.38.2.
>>>>>
>>>>>
>>>>> /proc/scsi/scsi identifies them as:
>>>>>
>>>>> "
>>>>> Host: scsi4 Channel: 00 Id: 04 Lun: 00
>>>>> Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
>>>>> Type: Direct-Access ANSI SCSI revision: 05
>>>>> "
>>>>>
>>>>> Sometimes I am see the following messages that indicate discard is
>>>>> disabled during runtime:
>>>>>
>>>>> Relevant dmesg:
>>>>>
>>>>> ...
>>>>> EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
>>>>> EXT4......
>>>>>
>>>>> .... (some time later)
>>>>>
>>>>> EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
>>>>> EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
>>>>> EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
>>>>> EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
>>>>> EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling
>>>> Please check whether your ssd works with discard or whether your ssd
>>>> firmware has the ability to do so.
>>>> I used an SSDSA2M160(I guess you are using the same type as me except
>>>> the volume size is 80g, but you have to find it out from intel side) and
>>>> after I upgraded my firmware to the new version(you can download it from
>>>> intel site), it supports discard now.
>>>
>>>
>>> Firmware is up to date as of a few weeks ago. It is 02M3 which still
>>> looks to be the current version.
>> ok...
>> So please check whether your device supports discard or not.
>> Intel has a tool named Intel SSD Toolbox, and it can check the status of
>> your ssd, but the bad thing is that it seems to only have a windows
>> version...
>
> Actually you can query that with hdparm -I /path/to/the/device and you
> should see something like
>
> * Data Set Management TRIM supported
>
> in the output.
oh, yes, I just tried the latest hdparm(9.37) and it does support trim
detection now! Thanks for the hint.
So I am still living in the rhel5 period. :(

Regards,
Tao

2011-04-22 16:08:22

by Keith Mannthey

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On Fri, 2011-04-22 at 09:44 +0200, Lukas Czerner wrote:
> On Fri, 22 Apr 2011, Tao Ma wrote:
>
> > On 04/22/2011 10:44 AM, Keith Mannthey wrote:
> > > On Fri, 2011-04-22 at 10:27 +0800, Tao Ma wrote:
> > >> On 04/22/2011 08:45 AM, Keith Mannthey wrote:
> > >>> Hello,
> > >>> I am using some Intel SSD drives with 2.6.38.2.
> > >>>
> > >>>
> > >>> /proc/scsi/scsi identifies them as:
> > >>>
> > >>> "
> > >>> Host: scsi4 Channel: 00 Id: 04 Lun: 00
> > >>> Vendor: ATA Model: INTEL SSDSA2M080 Rev: 02M3
> > >>> Type: Direct-Access ANSI SCSI revision: 05
> > >>> "
> > >>>
> > >>> Sometimes I am see the following messages that indicate discard is
> > >>> disabled during runtime:
> > >>>
> > >>> Relevant dmesg:
> > >>>
> > >>> ...
> > >>> EXT4-fs (sdw): mounted filesystem with ordered data mode. Opts: nobarrier,discard
> > >>> EXT4......
> > >>>
> > >>> .... (some time later)
> > >>>
> > >>> EXT4-fs warning (device sdw): release_blocks_on_commit:2672: discard not supported, disabling
> > >>> EXT4-fs warning (device sds): release_blocks_on_commit:2672: discard not supported, disabling
> > >>> EXT4-fs warning (device sdt): release_blocks_on_commit:2672: discard not supported, disabling
> > >>> EXT4-fs warning (device sdu): release_blocks_on_commit:2672: discard not supported, disabling
> > >>> EXT4-fs warning (device sdv): release_blocks_on_commit:2672: discard not supported, disabling
> > >> Please check whether your ssd works with discard or whether your ssd
> > >> firmware has the ability to do so.
> > >> I used an SSDSA2M160(I guess you are using the same type as me except
> > >> the volume size is 80g, but you have to find it out from intel side) and
> > >> after I upgraded my firmware to the new version(you can download it from
> > >> intel site), it supports discard now.
> > >
> > >
> > > Firmware is up to date as of a few weeks ago. It is 02M3 which still
> > > looks to be the current version.
> > ok...
> > So please check whether your device supports discard or not.
> > Intel has a tool named Intel SSD Toolbox, and it can check the status of
> > your ssd, but the bad thing is that it seems to only have a windows
> > version...
>
> Actually you can query that with hdparm -I /path/to/the/device and you
> should see something like
>
> * Data Set Management TRIM supported
>
> in the output.

I see

* Data Set Management TRIM supported
...
* Deterministic read after TRIM

set on my devices.

Thanks,
Keith


> Thanks!
> -Lukas
>
> >
> > Regards,
> > Tao
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >


2011-04-22 20:00:05

by Greg Freemyer

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On Thu, Apr 21, 2011 at 8:45 PM, Keith Mannthey <[email protected]> wrote:
<snip>
> I am new to SSDs and discard is there something else I need to do to
> make these drives work as expected?

Keith,

If you're new to SSD trim, you might want to read this SUSE wiki page.

http://en.opensuse.org/SDB:SSD_discard_%28trim%29_support

(I wrote most of it, but I tried to keep it factual.)

For reference, it talks some about opensuse 11.2 and 11.3 but you can
just think of those as older kernels. (11.4 just came out and has a
2.6.37 kernel.)

Greg

2011-04-23 06:41:25

by Girish Shilamkar

[permalink] [raw]
Subject: Re: Quick EXT4 discard question


----- [email protected] wrote:

> On Thu, Apr 21, 2011 at 8:45 PM, Keith Mannthey <[email protected]>
> wrote:
> <snip>
> > I am new to SSDs and discard is there something else I need to do
> to
> > make these drives work as expected?
>
> Keith,
>
> If you're new to SSD trim, you might want to read this SUSE wiki
> page.
>
> http://en.opensuse.org/SDB:SSD_discard_%28trim%29_support
>
> (I wrote most of it, but I tried to keep it factual.)
>
> For reference, it talks some about opensuse 11.2 and 11.3 but you can
> just think of those as older kernels. (11.4 just came out and has a
> 2.6.37 kernel.)
>
> Greg
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4"
> in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2011-04-23 14:23:49

by Eric Sandeen

[permalink] [raw]
Subject: Re: Quick EXT4 discard question

On 4/22/11 11:08 AM, Keith Mannthey wrote:
> On Fri, 2011-04-22 at 09:44 +0200, Lukas Czerner wrote:

...

>> Actually you can query that with hdparm -I /path/to/the/device and you
>> should see something like
>>
>> * Data Set Management TRIM supported
>>
>> in the output.
>
> I see
>
> * Data Set Management TRIM supported
> ...
> * Deterministic read after TRIM
>
> set on my devices.
>
> Thanks,
> Keith

So the way you get your message is:

ret = ext4_issue_discard(sb, entry->group,
entry->start_blk, entry->count);
if (unlikely(ret == -EOPNOTSUPP)) {
ext4_warning(sb, "discard not supported, "
"disabling");
clear_opt(sb, DISCARD);
}

which returns the error message from the calls below it:

ext4_issue_discard
sb_issue_discard
blkdev_issue_discard

and EOPNOTSUPP is pretty clear... I wonder if it could be that a discard request
on a particular boundary is causing it to be rejected?

-Eric