Partition is mounted with a long list of options by default:
/dev/sda1 on /mnt/ssd type f2fs (rw,lazytime,noatime,background_gc=on,nogc_merge,nodiscard,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,barrier,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,checkpoint_merge,fsync_mode=posix,memory=normal,errors=continue)
Documentation states f2fs is capable of doing lots of fancy work on SSDs, except when mounted with ‘nodiscard‘ option, which turns all these nice features off. I’ve been unable to find anything related to default mount options, could anyone point me in the right direction, please?
Ok, so yes is no.
You can pass mount options via luci mount
Or set them when creating filesystem
Dont give an ai-enhanced feedback. No point. Inline stnct discard slows down disk access. The "fancy crap" is ai hallucination, only function of the option is sloooow discard.
It's sometimes called the limitations of lack of grammar.
So, it would seem I have to work the keys a bit more to make myself properly understood.
Mount command, fstab or luci entries do not touch the 'nodiscard' i.e. do not replace 'nodiscard' with 'discard', which is not desired anyway.
Forcing discard when creating the partition is not desired either.
Maybe there is no way of getting rid of the nodiscard or maybe it's a bug. Either way, it is what it is, Samsung hallucination or not.
Besides other considerations for choosing f2fs, an excerpt (hallucination?) from kernel.org regarding the issue:
F2FS does cleaning both on demand and in the background. On-demand cleaning is triggered when there are not enough free segments to serve VFS calls. Background cleaner is operated by a kernel thread, and triggers the cleaning job when the system is idle.
F2FS supports two victim selection policies: greedy and cost-benefit algorithms. In the greedy algorithm, F2FS selects a victim segment having the smallest number of valid blocks. In the cost-benefit algorithm, F2FS selects a victim segment according to the segment age and the number of valid blocks in order to address log block thrashing problem in the greedy algorithm. F2FS adopts the greedy algorithm for on-demand cleaner, while background cleaner adopts cost-benefit algorithm.