Maybe. It depends on how rigorous the check is. Kernel memory, where I believe the actual mount of a reiserfs partition would usually take place, can never be swapped as far as I know. That leaves a userspace program that deals with an rfs partition, like mkreiserfs. Since those programs would never operate (with good results) on an in-use swap partition, the chances that the data contained in the header would match the relevant data for a swap partition is highly unlikely. Looking at the reiserfs header ( http://homes.cerias.purdue.edu/~florian/reiser/reiserfs.php) one could check the partition two ways: by computing (# of blocks in partition) * (block size), which is more likely to be inaccurate due to volume size not matching partition size, or by just checking if the header points to a valid root node (by checking the node height value). This pattern seems relatively unlikely to be reproduced in a swap partition.
This is a rather rigorous check, I will admit, but the reason I flagged this as vol_id's problem was because often the space left in the beginning of volumes is used for bootloader-related stuff. I think that it is more desirable that mkreiserfs touch only what is needed. This hasn't been a problem with linux distros in the past, obviously because this value was not computed, but I think backwards compatibility is always a plus if we can get it. I don't know the code at all for vol_id, but if those who do thing this approach is useful, worthwhile, and doable, I'm wiling to research and submit a patch to this effect. On Wed, Mar 19, 2008 at 7:01 PM, Colin Watson <[EMAIL PROTECTED]> wrote: > 0x10000 is in the middle of swap data. If vol_id checked for that first, > wouldn't it be quite possible (not even all that unlikely if a reiserfs > superblock had been swapped out ...) for it to run into something that > looked like reiserfs or any other filesystem in the middle of the swap > data? The swap data could be anything. > > I have to say that mkreiserfs seems like the buggy program here. > > -- > vol_id reports swap instead of resierfs > https://bugs.launchpad.net/bugs/203704 > You received this bug notification because you are a direct subscriber > of the bug. > -- vol_id reports swap instead of resierfs https://bugs.launchpad.net/bugs/203704 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
