On Wed, Mar 25, 2020 at 3:59 PM Jaegeuk Kim <jaeg...@kernel.org> wrote: > > Is it normal to return 0 bytes trimmed for F2FS partitions? By > > It's normal, and that's why I asked -o nodiscard. The reason is F2FS creates > asynchronous discard thread to alleviate long discarding latency among RW IOs. > It keeps candidates in memory, and the thread issues them in idle time.
That is really good information. Thanks for sharing it. How long does the async discard thread wait before it decides to check for idle and does the actual discard operation? I assume this mode is the recommended way to use F2FS since you guys have it setup by default. Please correct me if I am mistaken. > In that mode, when you do fstrim, F2FS collects all the discard candidates > given > address space, and returns zero, since it didn't issue any discard command at > the moment. > > But, if you set -o nodiscard, you can see the actual trimmed size, since F2FS > disabled the async discard thread and issue discard rightaway if device > supports > it. Also, I wanted to thank both you and and Chao for your helpful replies in troubleshooting this. So in summary for others happening across this, discard/trim is disabled on LUKS by default; be sure to read the Arch Wiki page I linked a few replies ago for details and for ways you can enable it if you understand the security risks of doing so. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel