NetBSD-Bugs archive

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

Re: kern/57307: panic: ffs_blkfree: bad size



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

From: Emmanuel Dreyfus <manu%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/57307: panic: ffs_blkfree: bad size
Date: Wed, 29 Mar 2023 15:27:04 +0000

 On Wed, Mar 29, 2023 at 02:35:01PM +0000, Chuck Silvers wrote:
 >  could you please supply the source for the program you're using to create the snapshot?
 
 https://ftp.espci.fr/pub/lastfss/lastfss-0.2.tgz
 
 The relevant parts:
                 unlink_on_create = 0;
 (...)
         if (statvfs(mount, &vfs) != 0)
                 err(EX_OSERR, "Cannot get info on %s", mount);
 (...)
         memset(&fs, 0, sizeof(fs));
 
         (void)snprintf(backend, sizeof(backend),
                        "%s/fssbackend-XXXXX", backend_dir);
         if ((tmpfd = mkstemp(backend)) == -1)
                 err(EX_OSERR, "cannot create backing store in %s", backend_dir);
 
         if (truncate(backend, vfs.f_blocks * vfs.f_frsize) != 0)
                 err(EX_OSERR, "cannot resize %s to %" PRId64,
                               backend, vfs.f_blocks * vfs.f_frsize);
 
         fs.fss_bstore = backend;
         fs.fss_mount = mount;
         fs.fss_flags = FSS_UNCONFIG_ON_CLOSE|unlink_on_create;
        
 (...)
         if (ioctl(fd, FSSIOCSET, &fs) != 0) {
 
 >  
 >  
 >  > The panic is 
 >  > panic: ffs_blkfree: bad size: dev = 0xa804, bno = 1 bsize = 32768, size = 32768, fs = /raid0
 >  
 >  "bno = 1" means that this is probably a UFS native snapshot inode,
 >  which uses special bno values such as:
 >  
 >  #define	BLK_NOCOPY	((daddr_t)(1))
 >  
 >  ffs_truncate() is supposed to call ffs_snapremove() to remove all of the special
 >  bno values from the bmap before going into the normal loop to free real blocks,
 >  but it looks like somehow that is not happening.
 >  
 >  -Chuck
 >  
 
 -- 
 Emmanuel Dreyfus
 manu%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index