NetBSD-Bugs archive

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

Re: PR/44209 CVS commit: src/sbin/resize_ffs



The following reply was made to PR bin/44209; it has been noted by GNATS.

From: "Michael L. Hitch" <mhitch%lightning.msu.montana.edu@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: PR/44209 CVS commit: src/sbin/resize_ffs
Date: Sun, 12 Dec 2010 14:22:25 -0700 (MST)

 On Sun, 12 Dec 2010, Michael L. Hitch wrote:
 
 > Modified Files:
 >      src/sbin/resize_ffs: resize_ffs.c
 >
 > Log Message:
 > Add support for old ffsv1 superblocks.  After reading an old superblock,
 > copy appropriate data to where they are expected in the updated superblock.
 > When writing the updated superblock, move the updated values back to the
 > old ffsv1 superblock locations.  Also check for old superblock format when
 > updating the last cylinder group and adjust cg_old_ncyl appropriately.
 > Derived from how mksf sets them.  Should address PR bin/44209.
 
    I misunderstood the problem described in this PR, so my changes don't 
 have anything to do with the PR.
 
    But I do think I know what is causing the error message to be hit.  The 
 first attempt to find the superblock looks for a superblock at offset 64K, 
 which is where the superblock for a ffsv2 file system resides.  The magic 
 won't match and it falls through to the test of the fs_old_flags.  If the 
 random data at that point has the flag bit set, the error will trigger. 
 So that check is completely bogus and should just be removed.  In fact, 
 the message says that it can't resize an ffsv2 format superblock, but 
 that's the only format superblock that resize_ffs.c could handle (but only
 for an ffsv1 filesystem).  My commit fixes it so it can handle either
 an ffsv1 format superblock kor an ffsv2 format superblock on an ffsv1
 file system.
 
 --
 Michael L. Hitch                       mhitch%montana.edu@localhost
 Computer Consultant
 Information Technology Center
 Montana State University       Bozeman, MT     USA
 


Home | Main Index | Thread Index | Old Index