| Issue 27: | Copying Data Blocks | |
| 1 person starred this issue and may be notified of changes. | Back to list |
While relocating a file, we are allocating data blocks in target tier and copying the data blocks of source inode to newly allocated blocks. We have two possibilities. 1. We allocate a target inode and copy the data blocks from source inode and update the directory entry of source file. 2. We allocate a target inode and copy the data blocks from source inode and update the source inode with new blocks and release target inode.
Jan 11, 2009
Project Member
#1
sandeepksinha
Jan 14, 2009
(No comment was entered for this change.)
Cc:
-fscops -sandeepksinha -sneha.hendre -bharati.alatgi -rohitvashist2kk3 -checkout.vineet -postrishi
Jan 23, 2009
We have developed our own Tricky Copy And Swap algorithm for relocation. We have three methods. 1. By using Memcopy 2. By page swap 3. By changing the blocknr in buffer head. Out of these we have selected Page swap method. Tricky Copy And Swap Algo: Allocate a ghost inode. (dest) Get the source inode.(src) Allocate a data block for ghost Read the block into buffer head 1 Read the source block into buffer head 2 Change the page no. of dest buffer = page no. of src buffer. Flush the page Now ghost inode has exact data from source Swap source i_data with ghost i_data Finally source inode has new data blocks so mark it dirty and delete the ghost inode.
Labels:
-Priority-Critical Priority-Medium
Jan 30, 2009
So we are going with the Page Flip Algorithm
Status:
Done
|