]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
mkfs: fix reflink/rmap logic w.r.t. realtime devices and crc=0 support
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 4 Sep 2020 00:18:27 +0000 (17:18 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 15 Sep 2020 01:46:36 +0000 (18:46 -0700)
commitc752b6d8c2ac7b9aadcf32872e8f0d6fcf7fe80e
tree3d41b14f0c590de79dc38301aa089d09be64763c
parent5852909ae31092392e3efc08feb1e83bc6e9d1d6
mkfs: fix reflink/rmap logic w.r.t. realtime devices and crc=0 support

mkfs has some logic to deal with situations where reflink or rmapbt are
turned on and the administrator has configured a realtime device or a V4
filesystem; such configurations are not allowed.

The logic ought to disable reflink and/or rmapbt if they're enabled due
to being the defaults, and it ought to complain and abort if they're
enabled because the admin explicitly turned them on.

Unfortunately, the logic here doesn't do that and makes no sense at all
since usage() exits the program.  Fix it to follow what everything else
does.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
mkfs/xfs_mkfs.c