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 ? Below, two minor compiler warnings avoidance... Regards Jean-Pierre Richard W.M. Jones wrote: > --- > configure.ac | 3 +- > include/ntfs-3g/ioctl.h | 30 ++++ > libntfs-3g/Makefile.am | 1 + > libntfs-3g/ioctl.c | 383 > ++++++++++++++++++++++++++++++++++++++++++++++++ > src/ntfs-3g.c | 31 +++- > 5 files changed, 441 insertions(+), 7 deletions(-) > create mode 100644 include/ntfs-3g/ioctl.h > create mode 100644 libntfs-3g/ioctl.c [...] > diff --git a/libntfs-3g/ioctl.c b/libntfs-3g/ioctl.c > new file mode 100644 > index 0000000..b0ec387 > --- /dev/null > +++ b/libntfs-3g/ioctl.c [...] > > + end_lcn = start_lcn+1; > + while (end_lcn < end_buf && > + (end_lcn-start_lcn) << > vol->cluster_size_bits Please cast (end_lcn-start_lcn) to u64 to silence a "comparing signed to unsigned compiler warning > + <= discard_max_bytes && > + !ntfs_bit_get(buf, end_lcn-start_buf)) > + end_lcn++; > + [...] > diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c > index 94bb138..476a4cb 100644 > --- a/src/ntfs-3g.c > +++ b/src/ntfs-3g.c [...] +static int ntfs_fuse_ioctl(const char *path, + int cmd, void *arg, + struct fuse_file_info *fi, Please append __attribute__((unused)) to silence a compiler warning. + unsigned int flags, void *data) +{ ------------------------------------------------------------------------------ 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 ntfs-3g-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel