On Wed, Jul 30, 2014 at 04:34:54PM +0200, Jean-Pierre André wrote: > Hi, > > I cannot really check the logic for the maximum trimming size > which can be accepted by the lower layers. > > I am checking on a ntfs loop device over ext3, and I see the > trimmings truncated to a variable length within the same > device. I even have seen different maximum lengths when > repeating the same test on a different (but identical) file. > > I guess this is related to the fragmentation of the underlying > file system (ext3), with trimming truncated to ends of > fragments. The loop device apparently does not reflect the > limitation imposed by the underlying file system (it probably > cannot, anyway, if this is variable). > > Now, a loop device is not a meaningful target for ntfs-3g. > Are you confident your length limitation would be fine > on a SSD ?
loop has a discard_max_bytes of 4G, so the code to limit the size of discards in ntfs-3g is never invoked. As you say the effective amount that can be discarded probably also depends on the ext3 block size. Also on bugs/races in the kernel, since the trimming code in the kernel is new and not much tested -- we have found many problems with it when writing virt-sparsify. You can emulate smaller discard sizes by inserting: *discard_granularity = 256 * 4096; in fstrim_limits. v5 will fix a few more bugs -- posting in a minute. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ ntfs-3g-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel
