Re: Efficient Create Swap File?

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

 



Todd Denniston wrote:
> 
> This brings up a question for me...
> If using the first method, while in use or during the mkswap command,
> does the  bits written to the file end up at the same physical locations
> as the 0s they are replacing?
Yes - you are saving back to the same file. Not like a work
processor that makes a new file, and then renames it to the name of
the original file.
> if they do, then the first method on a disk that is not fragmented,
> would give you a contiguous swap space.
> if they don't, then like you say, what is the point of writing all the
> 0s to disk?
> 
> So then do we have to think about our file systems?
> msdos/vfat would write to the same locations I think.
> ext2 would write to the same locations I think.
> ext3 without journaling, would write to the same locations I think.???
This is the same as ext2. (ext3 is ext2 with journaling.)
> ext3 with journaling, pathology???
> ext4 with/without journaling, I have not used or read about.???
> riser???
> others???
> 
Journaling should not make a difference. It is still reading/writing
the same file on the disk.

I am not sure how to explain this. You are accessing the file just
like you would access a hard drive. You are doing the equivalent of
accessing the track and sector of a hard drive. (Note: hard drives
are accessed as files under Linux/UNIX.) So if you read one block
from the file, modify it, and write it back to the same place, it is
also on the same place on the hard drive as the old block was.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux