From: shenghui Subject: unnecessary "memset(n, 0, block_size); " in dm_btree_empty ? Date: Sat, 10 Nov 2018 19:49:50 +0800 Message-ID: <9118.98302515528$1542014990@news.gmane.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Mikulas Patocka Cc: thornber@redhat.com, Mike Snitzer , agk@redhat.com List-Id: dm-devel.ids Hi, Sorry to trouble you. I'm reading the code of persistent data, and noticed: dm_btree_empty() -> new_block() -> dm_tm_new_block() to get a new block allocated. And the new block is zeroed with write lock held. "memset(n, 0, block_size);" in dm_btree_empty() seems unnecessary. Right? Thanks, shenghui