On 2020/3/16 17:52, John wrote: > On Sun, Mar 15, 2020 at 9:24 PM Chao Yu <yuch...@huawei.com> wrote: >> >> What's your mount option and mkfs option on those two partitions, and what's >> your kernel version? > > I am mounting the partitions with systemd like so (/etc/fstab entry): > LABEL=incoming /incoming f2fs noauto,x-systemd.automount 0 0 > > But I can reproduce this if I totally remove the entries within > /etc/fstab, reboot, and mount manually like this: > mount LABEL=incoming /incoming
However, the directory where you trigger trim is "/mnt/media"? Quoted: "Invoking it manually on the newer one gives this: # fstrim -v /mnt/media fstrim: /mnt/media: the discard operation is not supported" Could you give more details about that? What device is behind /mnt/media? > > Inspecting my shell history, I created them both with this command: > mkfs.f2fs -l incoming /dev/sdb2 > > I am running 5.5.9 on Arch Linux, but I believe I experienced this > under previous 5.5.x series as well. > > If you create a F2FS partition using the latest stable release of > f2fs-tools (1.13.0) are you able to reproduce the inability to trim? I can't, and also there is such option in mkfs to disable trim functionality during format. Thanks, > > Thank you for the consideration! > >> I checked the code, only place where we give 'not supported' is as below >> by checking whether underlying device supports discard. >> >> f2fs_ioc_fitrim() >> >> if (!f2fs_hw_support_discard(F2FS_SB(sb))) >> return -EOPNOTSUPP; >> >> So this should not happen that two partitions locates in one device have >> inconsistent discard support status. > . > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel