Re: I/O operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 3, 2009 at 1:08 AM, rohit vashist
<rohitvashist2kk3@xxxxxxxxx> wrote:
>
>
> On Sat, Jan 3, 2009 at 2:51 AM, Greg Freemyer <greg.freemyer@xxxxxxxxx>
> wrote:
>>
>> On Fri, Jan 2, 2009 at 3:34 PM, rohit vashist
>> <rohitvashist2kk3@xxxxxxxxx> wrote:
>> > Hi
>> >
>> > I went through the code of iostat.In the ninth field it gives the count
>> > of
>> > number of I/O,but it goes zero but it can be thought.
>> > Can u specify the grounds how hard it would to be suspend all the I/O
>> > currently on the device.
>> >
>> > Thanks
>>
>> I'm confused.  You only need to suspend all write activity per your
>> first post not all I/O, right?
>>
>> Are you trying to suspend write activity to the filesystem, or to the
>> underlying block device (ie. hdd/dm/md devices)?
>
> I just need to stop all the write operations on file system i.e it can be
> deviated to the request queue for a while though reads can be allowed .
>
>>
>> In a previous thread you asked about the filesystem block device
>> freeze support and seemed unhappy that it only suspended writes to the
>> block device, but left the filesystem writable via temporarily holding
>> data in a write cache.
>
> Sorry but i think that was not my thread.
>
>>
>> But in the above you ask about how to suspend writes to the block
>> device, and you already know how to do that.  At least writes
>> initiated by a filesystem.
>>
>> Please explain with more clarity where you need to suspend writes and
>> why a block device freeze is not adequate.
>
> See i need to suspend all writes on the file system for a moment.But i can
> allow all the reads to continue.That's all i need for now.
>>
>> Is the problem that whatever filesystem you are working with does not
>> support block device freeze?

Sounds to be that you are trying to perform a "filesystem block device
freeze".  Several filesystems support this because it is needed to
relieably create snapshots.

Reposting a couple messages from earlier this week on kernelnewbies:

===
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 ...
===
some confusion about userspace not being blocked by the above.
===
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.
===

HTH
Greg
-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux