More on this :

Jean-Pierre André wrote:
james harvey wrote:

[...]

openat(AT_FDCWD, "/mnt/ntf", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
ioctl(3, FITRIM, {start=0, len=0xffffffffffffffff, minlen=0}) = -1 EOPNOTSUPP (Operation not supported)

This surprises me, because the volume is apparently
open as "/mnt/ntf" (not /mnt/ntfs), moreover this
designates a directory (st_mode=S_IFDIR|0777), not
a block device, as ntfs-3g expects.

Actually this is correct : ntfs-3g receive a path to a file
or directory and it translates the path to the underlying
device . This underlying device has to be a block device
(nevertheless "/mnt/ntf" is unexpected).

So what does "stat /dev/lvm/ntfs" return ?

Would you please try having some control on what is
requested from ntfs-3g, first by defining an explicit
mount point :

mkdir /tmp/ntfs
ntfs-3g /dev/lvm/ntfs /tmp/ntfs
strace fstrim -v /tmp/ntfs
umount /tmp/ntfs

Moreover, to be sure that the mentioned error is
issued by ntfs-3g (rather than ntfs-3g forwarding an
error received from a lower layer), please record the
calls to ntfs-3g :

ntfs-3g -o debug /dev/lvm/ntfs /tmp/ntfs 2> ntfslog
strace fstrim -v /tmp/ntfs
umount /tmp/ntfs
(and make ntfslog available).

Actually there is a bug in ntfs-3g leading to the result
of ioctl() not to be logged. Use lowntfs-3g instead :

lowntfs-3g -o debug /dev/lvm/ntfs /tmp/ntfs 2> ntfslog
strace fstrim -v /tmp/ntfs
umount /tmp/ntfs




_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to