My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 24: Freezing the File System
2 people starred this issue and may be notified of changes. Back to list
 
Reported by postri...@gmail.com, Dec 31, 2008
Hello Everyone,

for relocation program to run we need to freeze the whole file system.

Thus it will block all the read write requests on the file system and put
them to wait state.

Then we can relocate the files which qualify for relocation
Dec 31, 2008
#1 postri...@gmail.com
i got a function freeze_bdev.

it takes the block device structure as input and returns the superblock

but the problem with this is that it is allowing the device to be read and inodes can
still be created
Jan 7, 2009
Project Member #2 sandeepksinha
freeze_bdev is the perfect solution. 

Pasting some line from kernelnewbies mailing list:


Do you understand the purpose of the freeze?

It is to ensure the underlying block device is stable and consistent.

I believe the primary in kernel user of freeze is device mapper (DM).

DM effectively does:

freeze
create COW based snapshot
unfreeze.

Creation of a COW (copy on write) snapshot is extremely quick, so the
freeze should only be in place for a very short period of time.

Note that reads of the filesystem do not interfere with the above.
Also, while frozen the filesystem is allowed to support a write cache,
it just cannot forward the writes / inode creations / etc. down to the
block device it is sitting on.

Greg

Rohit, that might cause unintentional consequences: e.g. causing the vfs to fail any
write requests to a filesystem with an error. On the other hand, a filesystem freeze
will block any I/Os from being written to disk and keep the filesystem state
consistent. I think freeze_bdev() is the best bet!

This is the right choice baby, aha !!!

I want this to be code complete. Rishi, takes the ownership of this.
See, the point here is that, once you freeze the fs with freeze_bdev, the blocks will
remain consistent and also, the incoming i/o's are cached, meaning that all the
operations which changes in-memory structures will pass. Later once you unfreeze,
everything is committed to disk.

Sound Perfect, implement it and verify !!!
Jan 7, 2009
Project Member #3 sandeepksinha
 Issue 26  has been merged into this issue.
Jan 7, 2009
#4 postri...@gmail.com
Just have a look on it


http://www.atcomputing.nl/Tools/cowloop/intro.html

this can also be quite helpful
Jan 13, 2009
#5 postri...@gmail.com
The problem has been resolved by the "Tricky Copy" Algorithm

refer  issue 27  for more details on it
Status: Fixed

Powered by Google Project Hosting