lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 May 2007 12:34:34 +0530
From:	"Aneesh Kumar K.V" <>
To:	Takashi Sato <>
CC:	linux-ext4 <>
Subject: Online defragmentation 

Hi Takashi,

I was looking at online defrag code and found that the tmp_inode is 
created with tmp_inode->i_nlink equal to zero. Now i am not sure whether 
i understand the code correctly, but AFAIU we allocate contiguous block 
using this tmp_inode. That means tmp_inode have extent details 
corresponding to the blocks. Now we are mapping the file data found in 
the original inode to this new blocks. Towards the end we does a iput. 
In iput since we have i_nlink as zero it will go ahead and call 
generic_delete_inode which will cause these data blocks to be marked 
free (right ?)

I haven't tested the defrag code. This came up when i was doing the 
online migration. With large file having large number of fragmented 
blocks I was getting the below error during the iput of the temporary 

"ext4_free_blocks Freeing blocks not in datazone ...."

I was able to fix that by setting i_nlink = 1 which will cause the 
generic_forget_inode to be called

To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists