Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766812 - sys-kernel/gentoo-kernel-5.10.*: fstrim does not work on ntfs3g mounted partition
Summary: sys-kernel/gentoo-kernel-5.10.*: fstrim does not work on ntfs3g mounted parti...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-24 08:55 UTC by Florian Dittmer
Modified: 2021-05-02 11:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Dittmer 2021-01-24 08:55:29 UTC
Hi,

I noticed that the fstrim command does not work anymore for my NTFS partitions, probably since upgrading to kernel 5.10.x series (currently using gentoo-kernel-5.10.10). With kernel 5.9.14 this was working without problems.

I have two ntfs partitions mounted in the system with NTFS-3G driver (
sys-fs/ntfs3g-2017.3.23-r3:0/88::gentoo):

/dev/nvme0n1p4 on /mnt/windows type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096) [windows]
/dev/nvme0n1p5 on /mnt/windaten type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096) [windaten]

I get the following error message when executing fstrim:

fstrim: /mnt/windows/: FITRIM ioctl failed: Device or resource busy

while on kernel 5.9.14 the program reported something like:

/mnt/windows/: 117.6 GiB (126225838080 bytes) trimmed

I already compiled gentoo-sources-5.10.10 with the same configuration file from the working gentoo-kernel-5.9.14 (extracted via /proc/config.gz), but still it doesn't work. So it might be no configuration problem but a regression in the 5.10.x kernel or a compatibility problem of ntfs3g driver with he newer kernel versions. Trimming of ext4 partitions works as expected with the 5.10.x kernel.

Thanks and best regards
Florian
Comment 1 Florian Dittmer 2021-03-13 17:40:24 UTC
Problem persists in current Kernel 5.11.x
Found this on the kernel list, might be fix. I didn't try this and will wait for stable 5.12.x, which hopefully fixes the problem

https://lore.kernel.org/linux-block/53689a67-7591-0ad8-3e7d-dca9a626cd99@kernel.dk/T/
Comment 2 Florian Dittmer 2021-05-02 11:20:47 UTC
Problem is fixed with Kernel 5.11.16-gentoo-dist (or maybe even earlier).