Bug 50021
Summary: | ext4 discard option not working on journal dissabled filesystem | ||
---|---|---|---|
Product: | File System | Reporter: | Gregory Krzystek (ninex) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | alan, lczerner, tm, tytso |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.6.5 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Gregory Krzystek
2012-11-03 23:22:13 UTC
Interesting, it works fine here with my intel ssd. So could you please do: 1. mount -t debugfs none /sys/kernel/debug/ 2. echo 1 > /sys/kernel/debug/tracing/events/ext4/ext4_discard_blocks/enable 3. run you test 4. after 'rm', do cat /sys/kernel/debug/tracing/trace If your see something like jbd2/sdb2-8-23853 [000] .... 30125.695303: ext4_discard_blocks: dev 8,18 blk 34816 count 3072 rm-23870 [000] .... 30130.908415: ext4_discard_blocks: dev 8,17 blk 34816 count 3072 (The first one is captured by the device with journal and the second one is captured by the device without journal). Then that does mean ext4 has sent out the discard command to the underlying device. btw, my kernel version is 3.6. The discard in no-journal mode has been re-enabled with commit b5e2368baeddf401bf3da9e364fc1c96676279cd ext4: re-enable -o discard functionality in no-journal mode so you probably have older kernel than that. Thanks! -Lukas To be fair to the original reporter, this commit only hit the mainline kernel in 3.7-rc1; given that he's running with a 3.6 kernel, he is running a pretty up-to-date kernel. Gregory, as Lukas pointed out, this functionality has been restored via commit b5e2368baedd. You should be able to cherry-pick this commit and apply it to the 3.6 kernel without any difficulty, since it's a fairly straightforward patch. Regards, -- Ted Thanks guys! :D This patch works for me. |