Hi! > > > The procfs modification is not really needed, I added it for completness. > > > The message from sys_swapon() should be enough. Or perhaps I'll > > > just add a separate message in sys_swapon() containing the "real" block > > > device name _and_ the offset for the newly activated swap. > > > > Okay, lets just mark it clearly in changelog, perhaps changing > > /proc/swaps is okay, perhaps not. > > I think I'll put the modification of /proc/swaps into a separate patch, so > that it will be easy to drop if it's rejected.
Thanks. > > So... being lazy Pavel I am, could you explain how we find which > > blocks belong to swap file? (Or do you use linklist of blocks for page > > directories?) > > Basically, in the same way we find the blocks that we have allocated from a > swap partition: we call get_swap_page_of_type() to allocate a swap page > (it returns the offset of the page _within_ the file/partition) and then we > call swapdev_block() (this only is a wrapper around map_swap_page()) to get > the "physical" offset (ie. wrt the beginning of the block device holding the > swap area). IOW, the swap-handling code does the job for us. :-) > > > Related question is -- how will we handle *huge* filesystems? Like > > > 32bit? > > The offsets are in (PAGE_SIZE) units. ;-) Yes, that means 16TB limitation :-). > Seriously, we can pass a sector_t to the kernel and that is 64-bit. Yes please. And use 64-bit on disk, so suspend still works with swapfile at the end of 20TB filesystem ;-). Ouch and then there's some talk about swapfiles over NFS... I guess we'll have some fun. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel