Latest updates.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · ----- "Martin Steigerwald
Please keep CC to TuxOnIce devel list.
Hi!
Quoted 7 lines
Nigel, who develops the alternative TuxOnIce hibernation / snapshot infrastructure, implemented checking last mount time of filesystem as a
safety feature for Ext 2, 3 and 4.He would like this also for XFS. Does XFS record the last mount time somewhere?
Nope.
Quoted 1 line
If not, could this be added?
Anythings possible ... its a relatively trivial change, and there's room in the superblock. Could probably even be done without a superblock version bump - if you were prepared to live with the possibility of finding zero in the ondisk location & dealing with it appropriately (i.e. last mount time unknown).
Guess you'd have to convince the XFS folks doing most of the work these days, but really it'd be quite trivial to implement. xfs_mount_log_sb() would be the place to start looking...
cheers.
Signature · 6 lines
Nathan _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 26 lines · Nathan Scott
Quoted 5 lines · ----- "Martin Steigerwald
Please keep CC to TuxOnIce devel list.
Hi!
Quoted 7 lines
Nigel, who develops the alternative TuxOnIce hibernation / snapshot infrastructure, implemented checking last mount time of filesystem as a
safety feature for Ext 2, 3 and 4.He would like this also for XFS. Does XFS record the last mount time somewhere?
Nope.
Quoted 1 line
If not, could this be added?
Anythings possible ... its a relatively trivial change, and there's room in the superblock. Could probably even be done without a superblock version bump - if you were prepared to live with the possibility of finding zero in the ondisk location & dealing with it appropriately (i.e. last mount time unknown).
Quoted 3 lines
Guess you'd have to convince the XFS folks doing most of the work these days, but really it'd be quite trivial to implement.
xfs_mount_log_sb()would be the place to start looking...
Agreed that it is trivial to implement but there are still some definite traps - like the fact the sb change transaction may be logged immediately but the physical superblock may not get written for some time after the mount.
Really it comes down to the interface used to read the mount time fromt eh superblock at suspend and resume - can anyone tell me what that is or point me at the code?
Personally I don't see why this needs to be in the superblock - an extended attribute on the root directory of the root filesystem that is written:
a) by a startup script at boot time; b) by the suspend code; c) copied into the suspend image; and d) read and verified during resume
seems sufficient to me to provide what you want. This has the benefit of being completely filesystem independent and doesn't require on-disk format changes for every filesystem that ppl want TuxOnIce to supprt.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
[Looks like tuxonice is a subscriber-only list...]
Quoted 7 lines · ----- "Dave Chinner
Quoted 1 line · Nathan Scott
Quoted 1 line
Agreed that it is trivial to implement but there are still some definite traps - like the fact the sb change transaction may be logged
immediately but the physical superblock may not get written for some time after the mount.
*nod* ... it will be written when unmounted though...
Quoted 4 lines
Really it comes down to the interface used to read the mount time fromt eh superblock at suspend and resume - can anyone tell me what that is or point me at the code?
(not me!)
Quoted 3 lines
Personally I don't see why this needs to be in the superblock - an extended attribute on the root directory of the root filesystem that is written:
Yeah, that was my first thought too, but I suspect they want to be able to query this when the filesystem is unmounted; in which case the interface is probably "read a fs-specific magic spot ondisk". For this not-mounted query, the EA route would be incredibly painful.
cheers.
Signature · 6 lines
Nathan _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Nathan Scott
[Looks like tuxonice is a subscriber-only list...]
Quoted 2 lines · ----- "Dave Chinner
Quoted 1 line · Nathan Scott
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Agreed that it is trivial to implement but there are still some definite traps - like the fact the sb change transaction may be logged
immediately but the physical superblock may not get written for some time after the mount.*nod* ... it will be written when unmounted though...
suspend in the kernel doesn't unmount filesystems. I have no idea what tuxonice does these days, but last time I heard it left them mounted but frozen over the suspend/resume cycle.
Quoted 6 lines
Quoted 3 lines
Really it comes down to the interface used to read the mount time fromt eh superblock at suspend and resume - can anyone tell me what that is or point me at the code?
(not me!)
Quoted 8 lines
Quoted 3 lines
Personally I don't see why this needs to be in the superblock - an extended attribute on the root directory of the root filesystem that is written:
Yeah, that was my first thought too, but I suspect they want to be able to query this when the filesystem is unmounted; in which case the interface is probably "read a fs-specific magic spot ondisk". For this not-mounted query, the EA route would be incredibly painful.
I know, but it's the "read from the magic spot on disk" approach that I'm most concerned about. It's so easy to implement, but oh so easy get wrong because block device access is not coherent with the filesystem. Not to mention that if we change the format of the "magic spot" then the application breaks, whereas that will not happen if access is via extended attributes.
Essentially, I don't want to see another boot related, filesystem interacting application having random problems with XFS and then doing stupid stuff to try to work around problems caused by fundamentally broken assumptions made by the application. IMO, learning from the mistakes the world's most screwed up bootlader (grub) made is a good idea....
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 13 lines · Dave Chinner
Quoted 12 lines · Nathan Scott
[Looks like tuxonice is a subscriber-only list...]
Quoted 7 lines · ----- "Dave Chinner
Quoted 1 line · Nathan Scott
Quoted 1 line
Agreed that it is trivial to implement but there are still some definite traps - like the fact the sb change transaction may be logged
immediately but the physical superblock may not get written for some time after the mount.
Quoted 5 lines
Quoted 1 line
*nod* ... it will be written when unmounted though...
suspend in the kernel doesn't unmount filesystems. I have no idea what tuxonice does these days, but last time I heard it left them mounted but frozen over the suspend/resume cycle.
I found the code - it doesn't unmount filesystems. The git tree is here:
http://git.kernel.org/?p=linux/kernel/git/nigelc/tuxonice-head.git;a=summary
It appears that it walks the list of superblocks to grab the block device off each mounted superblock to do it's work, so I don't see any fundamental problem with using an attribute hanging off sb->s_root to hold the boot time...
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Hi.
Quoted 20 lines · Dave Chinner
Quoted 11 lines · Dave Chinner
Quoted 10 lines · Nathan Scott
[Looks like tuxonice is a subscriber-only list...]
Quoted 6 lines · ----- "Dave Chinner
On Wed, Jan 13, 2010 at 02:09:14PM +1100, Nathan Scott wrote:
Agreed that it is trivial to implement but there are still some definite traps - like the fact the sb change transaction may be logged
immediately but the physical superblock may not get written for some time after the mount.Quoted 4 lines
Quoted 1 line
*nod* ... it will be written when unmounted though...
suspend in the kernel doesn't unmount filesystems. I have no idea what tuxonice does these days, but last time I heard it left them mounted but frozen over the suspend/resume cycle.
I found the code - it doesn't unmount filesystems. The git tree is here:
Quoted 6 lines
http://git.kernel.org/?p=linux/kernel/git/nigelc/tuxonice-head.git;a=summary
It appears that it walks the list of superblocks to grab the block device off each mounted superblock to do it's work, so I don't see any fundamental problem with using an attribute hanging off
sb->s_rootto hold the boot time...
Yeah. The idea is to have very simple code that looks at a fixed number of bytes at a known offset into the partition. The value of the bytes is stored in the image header, and compared prior to starting to resume. If the data is different, we assume the filesystem has been mounted since the image was written and it's unsafe to resume. It doesn't _need_ to be a time - just something that's guaranteed to have changed if the filesystem gets mounted afresh.
By the way, sorry for the slow replies so far and for slow ones in the coming 24 hours. I'm on holidays and my father-in-law's funeral is tomorrow.
Nigel
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs