]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: provide more useful errors for invalid swap files
authorOmar Sandoval <osandov@fb.com>
Wed, 16 May 2018 18:13:34 +0000 (11:13 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 16 May 2018 18:13:34 +0000 (11:13 -0700)
commitb3df5e29f2b755e3712b62c984b0575a2bb18565
treed76095559d4e0ed673eaee92e9b9da096e5a774f
parentd8667aa30660d1b8ab202b0ca7b6449a76fbfd84
iomap: provide more useful errors for invalid swap files

Currently, for an invalid swap file, we print the same error message
regardless of the reason. This isn't very useful for an admin, who will
likely want to know why exactly they can't use their swap file. So,
let's add specific error messages for each reason, and also move the
bdev check after the flags checks, since the latter are more
fundamental.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/iomap.c