Skip to contentSkip to conversation

Quick EXT4 discard question

DISCUSSION Keith Mannthey 5 participants 9 messages Apr 22, 2011 – Apr 23, 2011

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 21 lines · Keith Mannthey

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

Quoted 7 lines

.... (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

#2 lore raw
Quoted 29 lines · Tao Ma
Quoted 21 lines · Keith Mannthey

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

Quoted 7 lines

.... (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

Quoted 6 lines

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

#3 lore raw
Quoted 38 lines · Keith Mannthey
Quoted 29 lines · Tao Ma
Quoted 21 lines · Keith Mannthey

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

Quoted 7 lines

.... (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

Quoted 6 lines

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.

Quoted 2 lines

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

#4 lore raw
Quoted 39 lines · Tao Ma
Quoted 38 lines · Keith Mannthey
Quoted 35 lines · Tao Ma
Quoted 21 lines · Keith Mannthey

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

Quoted 7 lines

.... (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.

Quoted 7 lines
Quoted 2 lines

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

Quoted 8 lines

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

#5 lore raw
Quoted 49 lines · Lukas Czerner
Quoted 39 lines · Tao Ma
Quoted 38 lines · Keith Mannthey
Quoted 35 lines · Tao Ma
Quoted 21 lines · Keith Mannthey

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

Quoted 7 lines

.... (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.

Quoted 7 lines
Quoted 2 lines

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

Quoted 6 lines

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

#6 lore raw
In reply to Lukas Czerner
Quoted 49 lines · Lukas Czerner
Quoted 39 lines · Tao Ma
Quoted 38 lines · Keith Mannthey
Quoted 35 lines · Tao Ma
Quoted 21 lines · Keith Mannthey

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

Quoted 7 lines

.... (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.

Quoted 7 lines
Quoted 2 lines

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

Quoted 6 lines

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

Quoted 11 lines

Thanks!
-Lukas

Quoted 8 lines

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

#7 lore raw
Quoted 1 line · Keith Mannthey

On Fri, 2011-04-22 at 09:44 +0200, Lukas Czerner wrote:

...

Quoted 9 lines
Quoted 6 lines

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

Quoted 8 lines

* 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

#8 lore raw
In reply to Keith Mannthey

On Thu, Apr 21, 2011 at 8:45 PM, Keith Mannthey <[email protected]> wrote:
<snip>

Quoted 2 lines

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