There is a space between pri=0 and defaults. Spaces are field delimiters inside /etc/fstab, so there should be a comma instead of a space.
In addition to that, you’ve got too many options for your swap partition. This in itself won’t create the problem you’re seeing, but it’s futile as the swap partition does not contain a filesystem. Also, your discard option is wrong.
Enable swap discards, if the swap backing device supports the discard or trim operation. This may improve performance on some Solid State Devices, but often it does not . The option allows one to select between two available swap discard policies: --discard=once to perform a single-time discard operation for the whole swap area at swapon; or --discard=pages to asynchronously discard freed swap pages before they are available for reuse. If no policy is selected, the default behavior is to enable both discard types. The /etc/fstab mount options discard, discard=once, or discard=pages may also be used to enable discard flags.
The swap partition(s) is(/are) the exception to the rule. fstrim.timer only works on filesystems ─ and for that matter, only if they are mounted read/write, not if they are mounted read-only ─ but the swap partition doesn’t contain any filesystem, and as such, its blocks would never get trimmed.
That’s why discard=pages is recommended for the swap partition ─ it will only trim the blocks for swapped out pages when the whole page is deleted from swap again. This ensures that there will be enough blocks to trim (so that the device won’t ignore the trim request), and that it’s not trimming on every single write.
I haven’t understood most of the things you have all said.
I’m going to read more about this because I want to understand all these options.
I changed the line and now it’s exactly what Aragorn suggested.
Everything seems to be perfect now.
Thank you all very much!!
Happy new year!!