]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: validate sb_logsunit is a multiple of the fs blocksize
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 25 Oct 2017 23:59:43 +0000 (16:59 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 22:38:29 +0000 (15:38 -0700)
commit8308ee486696e16140616dfec6c31f37f4d605d4
treee3cbb330bef91efa154c4b1809c325036a77b7f0
parent4ba3f604563474f6737130cff4cec110f23bea83
xfs: validate sb_logsunit is a multiple of the fs blocksize

Make sure the log stripe unit is sane before proceeding with mounting.
AFAICT this means that logsunit has to be 0, 1, or a multiple of the fs
block size.  Found this by setting the LSB of logsunit in xfs/350 and
watching the system crash as soon as we try to write to the log.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_log.c