lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 31 May 2007 13:05:06 +0900
From:	"Takashi Sato" <sho@...s.nec.co.jp>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	"linux-ext4" <linux-ext4@...r.kernel.org>
Subject: Re: Online defragmentation

Hi,

>> 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 ?)
>>
>
> Looking at the code again i guess for defragmentation it is okey. I guess what actually 
> happens is the blocks that is corresponding to the original inode get accounted under 
> tmp_inode. (it actually does a swap of blocks ) So doing a iput with i_nlink = 0 is the 
> correct approach.
>
> Correct me if i am wrong.

Your understanding is right.
The iput() is called to free the old blocks which were in the original
inode.

Cheers, Takashi 

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ