Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Chao Yu
On 2020/12/8 9:26, Jaegeuk Kim wrote: On 12/08, Chao Yu wrote: On 2020/12/8 4:37, Eric Biggers wrote: On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { This really could use some parentheses. People shouldn't have to l

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Jaegeuk Kim
On 12/08, Chao Yu wrote: > On 2020/12/8 4:37, Eric Biggers wrote: > > On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: > > > + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { > > > > This really could use some parentheses. People shouldn't have to look up a > > C operator preced

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Chao Yu
On 2020/12/8 4:37, Eric Biggers wrote: On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { This really could use some parentheses. People shouldn't have to look up a C operator precedence table to understand the code. Wi

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Joe Perches
On Mon, 2020-12-07 at 12:37 -0800, Eric Biggers wrote: > On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: > > + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { > > This really could use some parentheses. People shouldn't have to look up a > C operator precedence table to under

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Eric Biggers
On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: > + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { This really could use some parentheses. People shouldn't have to look up a C operator precedence table to understand the code. > + u32 provided = le32_to_cpu(dic

[f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-11-26 Thread Chao Yu
This patch supports to store chksum value with compressed data, and verify the integrality of compressed data while reading the data. The feature can be enabled through specifying mount option 'compress_chksum'. Signed-off-by: Chao Yu --- v3: - remove incorrect duplicated definition in f2fs_deco