Re: Freezing File Systems

Mark Brown <[email protected]> Wed, 31 Dec 2008 17:58:24 -0500
Newsgroups gmane.linux.kernel.kernelnewbies,gmane.comp.file-systems.ext2.devel
Message-ID <[email protected]>
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!

-- Mark

On Dec 31, 2008, at 3:40 PM, Rohit Sharma wrote:

> On Thu, Jan 1, 2009 at 2:04 AM, Rohit Sharma <[email protected]>  
> wrote:
>> May be remounting the file system in read only mode will help.
>>
>> try this:
>> # mount -o remount,ro <filesystem>
>>
> Yes this works, after remounting the file system in read only mode you
> cant create new files and
> you cant even write anything. I hope that helps.
>
>>
>> On Wed, Dec 31, 2008 at 8:36 PM, rishi agrawal  
>> <[email protected]> wrote:
>>> as far as i have understood it is not freezing the file system but  
>>> it
>>> is only freezing the write operation on block device
>>>
>>> had it been freezing the file system inode creation would also block
>>>
>>>
>>>
>>> On Wed, Dec 31, 2008 at 8:09 PM, rishi agrawal  
>>> <[email protected]> wrote:
>>>> I used a kernel module to freeze the file system using the  
>>>> function freeze_bdev
>>>>
>>>> but when i am try to use touch command on the file system i am  
>>>> able to
>>>> create the files.
>>>>
>>>> even read requests are served immediately
>>>>
>>>> only the write requests are being blocked
>>>>
>>>> until i call the thaw function
>>>>
>>>> can i have an explanation for this
>>>>
>>>> On Wed, Dec 31, 2008 at 6:11 PM, ajit mote  
>>>> <[email protected]> wrote:
>>>>> Hello,
>>>>>
>>>>>> I want to freeze a file system. I have seen a field in vfs  
>>>>>> superblock
>>>>>> s_frozen.
>>>>>>
>>>>>> But i am clue less about freezing the file system using that.
>>>>>
>>>>>
>>>>> freeze_bdev function ( fs/buffer.c) lock a filesystem and force  
>>>>> it into a
>>>>> consistent state ...
>>>>> Above function use s_frozen flag to freez the file system ...
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Rishi B. Agrawal
>>>>>>
>>>>>> --
>>>>>> To unsubscribe from this list: send an email with
>>>>>> "unsubscribe kernelnewbies" to [email protected]
>>>>>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Ajit Subhash Mote
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Rishi B. Agrawal
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Rishi B. Agrawal
>>>
>>> --
>>> To unsubscribe from this list: send an email with
>>> "unsubscribe kernelnewbies" to [email protected]
>>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>>
>>>
>>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to [email protected]
> Please read the FAQ at http://kernelnewbies.org/FAQ
>


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ