]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Output warning message when discard option was enabled even though the device...
authorKenjiro Nakayama <nakayamakenjiro@gmail.com>
Mon, 18 Sep 2017 19:03:56 +0000 (12:03 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 26 Sep 2017 01:22:30 +0000 (18:22 -0700)
commit20755efde996fa49a471033eb002705abc674cf0
tree64b264ae26ae49ce45b2f74759101458af6009dc
parent4e97581579633b70797cb6edbb3970636cf1749f
xfs: Output warning message when discard option was enabled even though the device does not support discard

In order to using discard function, it is necessary that not only xfs
is mounted with discard option, but also the discard function is
supported by the device. Current code doesn't output any message when
users mount with discard option on unsupported device, so it is
difficult to notice that it was not enabled actually.

This patch adds the warning message to notice that discard option is
not enabled due to unsupported device when the filesystem is mounted.

Changes in v2 (Suggested by Brian Foster):
  - Move the unsupported device check into xfs_fs_fill_super().
  - Clear the discard flag when device is unsupported.

Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_super.c