linux/fs/xfs/linux-2.6
Lukas Czerner 5d15765594 xfs: check if device support discard in xfs_ioc_trim()
Right now we, are relying on the fact that when we attempt to
actually do the discard, blkdev_issue_discar() returns -EOPNOTSUPP
and the user is informed that the device does not support discard.

However, in the case where the we do not hit any suitable free
extent to trim in FITRIM code, it will finish without any error.
This is very confusing, because it seems that FITRIM was successful
even though the device does not actually supports discard.

Solution: Check for the discard support before attempt to search for
free extents.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-02-21 20:39:00 -06:00
..
kmem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
kmem.h xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
mrlock.h
time.h
xfs_acl.c xfs: provide simple rcu-walk ACL implementation 2011-01-07 17:50:30 +11:00
xfs_aops.c xfs: simplify xfs_map_at_offset 2010-12-16 16:06:07 -06:00
xfs_aops.h xfs: kill xfs_iomap 2010-12-16 16:05:51 -06:00
xfs_buf.c xfs: fix error handling for synchronous writes 2011-01-11 20:28:42 -06:00
xfs_buf.h xfs: fix error handling for synchronous writes 2011-01-11 20:28:42 -06:00
xfs_discard.c xfs: check if device support discard in xfs_ioc_trim() 2011-02-21 20:39:00 -06:00
xfs_discard.h xfs: add FITRIM support 2011-01-11 20:28:29 -06:00
xfs_export.c xfs: fix exporting with left over 64-bit inodes 2010-12-16 16:04:55 -06:00
xfs_export.h
xfs_file.c fallocate should be a file operation 2011-01-17 02:25:31 -05:00
xfs_fs_subr.c xfs: use range primitives for xfs page cache operations 2010-10-18 15:07:24 -05:00
xfs_globals.c xfs: remove xfs_cred.h 2010-10-18 15:08:06 -05:00
xfs_ioctl32.c xfs: Extend project quotas to support 32bit project ids 2010-10-18 15:08:08 -05:00
xfs_ioctl32.h xfs: Extend project quotas to support 32bit project ids 2010-10-18 15:08:08 -05:00
xfs_ioctl.c xfs: limit extsize to size of AGs and/or MAXEXTLEN 2011-01-28 09:05:36 -06:00
xfs_ioctl.h xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_iops.c fallocate should be a file operation 2011-01-17 02:25:31 -05:00
xfs_iops.h [XFS] add a FMODE flag to make XFS invisible I/O less hacky 2008-12-11 13:14:41 +11:00
xfs_linux.h xfs: use wait queues directly for the log wait queues 2010-12-21 12:09:01 +11:00
xfs_quotaops.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6 2010-08-07 12:57:07 -07:00
xfs_stats.c xfs: switch to seq_file 2009-09-15 12:29:24 -05:00
xfs_stats.h
xfs_super.c Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs 2011-01-14 15:24:17 -08:00
xfs_super.h xfs: remove xfs_version.h 2010-10-18 15:08:04 -05:00
xfs_sync.c xfs: ensure log covering transactions are synchronous 2011-01-11 20:28:17 -06:00
xfs_sync.h xfs: implement batched inode lookups for AG walking 2010-10-18 15:07:53 -05:00
xfs_sysctl.c xfs: prevent NMI timeouts in cmn_err 2011-01-12 08:46:41 -06:00
xfs_sysctl.h [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_trace.c xfs: remove unneeded #include statements 2010-07-26 13:16:33 -05:00
xfs_trace.h xfs: add FITRIM support 2011-01-11 20:28:29 -06:00
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c xfs: constify xattr_handler 2010-05-21 18:31:19 -04:00