Skip to contentSkip to conversation

ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate

DISCUSSION Dan Carpenter 2 participants 2 messages Mar 28, 2014 – Mar 31, 2014

lore
Share & tools
lore
#0 lore raw

Hello Lukas Czerner,

The patch 1f0e51771281: "ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate" from Mar 18, 2014, leads to the following static checker warning:

	fs/ext4/extents.c:3653 ext4_split_convert_extents()
	warn: odd binop '0x4 & 0x10'

fs/ext4/extents.c
3650 } else if (flags | EXT4_GET_BLOCKS_CONVERT) {
3651 split_flag |= ee_block + ee_len <= eof_block ?
3652 EXT4_EXT_MAY_ZEROOUT : 0;

  3653                  split_flag |= (EXT4_EXT_MARK_UNINIT2 & EXT4_EXT_DATA_VALID2);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This statement is a no-op. Probably | was intended?

  3654          }
  3655          flags |= EXT4_GET_BLOCKS_PRE_IO;

regards,
dan carpenter

#1 lore raw
Quoted 15 lines · Dan Carpenter

Date: Fri, 28 Mar 2014 11:03:56 +0300
From: Dan Carpenter <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: re: ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate

Hello Lukas Czerner,

The patch 1f0e51771281: "ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate" from Mar 18, 2014, leads to the following static checker warning:

	fs/ext4/extents.c:3653 ext4_split_convert_extents()
	warn: odd binop '0x4 & 0x10'
Quoted 6 lines

fs/ext4/extents.c
3650 } else if (flags | EXT4_GET_BLOCKS_CONVERT) {
3651 split_flag |= ee_block + ee_len <= eof_block ?
3652 EXT4_EXT_MAY_ZEROOUT : 0;

  3653                  split_flag |= (EXT4_EXT_MARK_UNINIT2 & EXT4_EXT_DATA_VALID2);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Right,

thanks.

-Lukas

Quoted 8 lines

This statement is a no-op. Probably | was intended?

  3654          }
  3655          flags |= EXT4_GET_BLOCKS_PRE_IO;

regards,
dan carpenter