tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: panic: ffs_snapshot_mount: already on list
On Wed, Sep 12, 2018 at 09:37:46AM +0000, Emmanuel Dreyfus wrote:
> On Wed, Sep 12, 2018 at 09:48:21AM +0200, Manuel Bouyer wrote:
> > Yes, IHMO it should not panic but complains and ignore the invalid snapshots.
> > In your case you had to mount the FS read/write to fix the problem
> > (I guess you could have fixed it with fsdb+fsck too, but we should not have
> > to go there to go back to a mountable filesystem).
>
> Something like this? (I retained the #ifndef FFS_NO_SNAPSHOT which
> saved my day)
> --- sys/ufs/ffs/ffs_snapshot.c.orig
> +++ sys/ufs/ffs/ffs_snapshot.c
> @@ -1734,8 +1734,9 @@
> */
> void
> ffs_snapshot_mount(struct mount *mp)
> {
> +#ifndef FFS_NO_SNAPSHOT
> struct vnode *devvp = VFSTOUFS(mp)->um_devvp;
> struct fs *fs = VFSTOUFS(mp)->um_fs;
> struct lwp *l = curlwp;
> struct vnode *vp;
> @@ -1823,14 +1824,15 @@
>
> /*
> * Link it onto the active snapshot list.
> */
> - if (is_active_snapshot(si, ip))
> - panic("ffs_snapshot_mount: %"PRIu64" already on list",
> + if (is_active_snapshot(si, ip)) {
> + printf("ffs_snapshot_mount: %"PRIu64" already on list",
> ip->i_number);
maybe clear fs->fs_snapinum[snaploc] in that case ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index