From 7d322c735e3d9e6a0e551d3921e9d84531b8c9de Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Tue, 29 Apr 1997 17:11:51 +0000 Subject: [PATCH] For multi-session CD-ROMs, we have to account for previous sessions as well in volume_space_size. Otherwise, NFS exports won't work. --- sys/fs/cd9660/cd9660_vfsops.c | 11 ++++++++++- sys/isofs/cd9660/cd9660_vfsops.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 764ce6b0039..a875434990a 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.22 1997/04/14 18:15:46 phk Exp $ + * $Id: cd9660_vfsops.c,v 1.23 1997/04/29 15:52:53 joerg Exp $ */ #include @@ -313,6 +313,15 @@ iso_mountfs(devvp, mp, p, argp) isonum_733 (high_sierra? pri_sierra->volume_space_size: pri->volume_space_size); + /* + * Since an ISO9660 multi-session CD can also access previous + * sessions, we have to include them into the space consider- + * ations. This doesn't yield a very accurate number since + * parts of the old sessions might be inaccessible now, but we + * can't do much better. This is also important for the NFS + * filehandle validation. + */ + isomp->volume_space_size += argp->ssector; bcopy (rootp, isomp->root, sizeof isomp->root); isomp->root_extent = isonum_733 (rootp->extent); isomp->root_size = isonum_733 (rootp->size); diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 764ce6b0039..a875434990a 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 - * $Id: cd9660_vfsops.c,v 1.22 1997/04/14 18:15:46 phk Exp $ + * $Id: cd9660_vfsops.c,v 1.23 1997/04/29 15:52:53 joerg Exp $ */ #include @@ -313,6 +313,15 @@ iso_mountfs(devvp, mp, p, argp) isonum_733 (high_sierra? pri_sierra->volume_space_size: pri->volume_space_size); + /* + * Since an ISO9660 multi-session CD can also access previous + * sessions, we have to include them into the space consider- + * ations. This doesn't yield a very accurate number since + * parts of the old sessions might be inaccessible now, but we + * can't do much better. This is also important for the NFS + * filehandle validation. + */ + isomp->volume_space_size += argp->ssector; bcopy (rootp, isomp->root, sizeof isomp->root); isomp->root_extent = isonum_733 (rootp->extent); isomp->root_size = isonum_733 (rootp->size);