On Fri, Nov 21, 2014 at 04:20:44PM -0500, Mike Frysinger wrote: > On 21 Nov 2014 18:09, Lutz Vieweg wrote: > > The relevant strace output of the above fstrim command: > > > stat("/mnt/PFexp1", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0 > > > open("/mnt/PFexp1", O_RDONLY) = 3 > > > ioctl(3, FITRIM, 0x7fff0733a4c0) = -1 EIO (Input/output error) > > that hasn't decoded the ioctl (send a patch for that), but guess is that you're > passing down the default: > range.start = 0; > range.minlen = 0; > range.len = UULONG_MAX; > > in which case the expectation is the kernel layers will take care of trimming > everything and not die when it hits the end of the device. Yep, it's fine to specify such range, xfs_ioc_trim(): end = start + BTOBBT(range.len) - 1; ... if (end > XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks) - 1) end = XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks)- 1; it really seems like kernel issue. (CC: to Lukas). Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html