On 05/15/2018 04:35 PM, Duncan wrote: > Su Yue posted on Tue, 15 May 2018 16:05:01 +0800 as excerpted: > > >> >> On 05/15/2018 03:51 PM, Misono Tomohiro wrote: >>> Incompat flag of lzo/zstd compression should be set at: >>> 1. mount time (-o compress/compress-force) >>> 2. when defrag is done 3. when property is set >>> >>> Currently 3. is missing and this commit adds this. >>> >>> >> If I don't misunderstand, compression property of an inode is only apply >> for *the* inode, not the whole filesystem. >> So the original logical should be okay. > > But the inode is on the filesystem, and if it's compressed with lzo/zstd, > the incompat flag should be set to avoid mounting with an earlier kernel > that doesn't understand that compression and would therefore, if we're > lucky, simply fail to read the data compressed in that file/inode. (If > we're unlucky it could blow up with kernel memory corruption like James > Harvey's current case of unexpected, corrupted compressed data in a nocow > file that being nocow, doesn't have csum validation to fail and abort the > decompression, and shouldn't be compressed at all.) > > So better to set the incompat flag and refuse to mount at all on kernels > that don't have the required compression support. >
Get it. As your conclusion, it's indeed better to set the incompat flag. Thanks, Su
pEpkey.asc
Description: application/pgp-keys