SCCS-vsn: sys/kern/kern_exec.c 7.4
SCCS-vsn: sys/ufs/ffs/ffs_alloc.c 7.2
SCCS-vsn: sys/ufs/lfs/lfs_alloc.c 7.2
SCCS-vsn: sys/kern/vfs_bio.c 7.2
SCCS-vsn: sys/kern/vfs_cluster.c 7.2
SCCS-vsn: sys/ufs/ffs/ffs_balloc.c 7.2
SCCS-vsn: sys/ufs/lfs/lfs_balloc.c 7.2
SCCS-vsn: sys/ufs/ffs/ffs_inode.c 7.2
SCCS-vsn: sys/ufs/ffs/ufs_inode.c 7.2
SCCS-vsn: sys/ufs/lfs/lfs_inode.c 7.2
SCCS-vsn: sys/ufs/ufs/ufs_inode.c 7.2
SCCS-vsn: sys/ufs/ffs/ffs_vfsops.c 7.3
SCCS-vsn: sys/ufs/ffs/ufs_vfsops.c 7.3
SCCS-vsn: sys/ufs/lfs/lfs_vfsops.c 7.3
SCCS-vsn: sys/ufs/ufs/ufs_vfsops.c 7.3
SCCS-vsn: sys/kern/vfs_lookup.c 7.2
SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 7.2
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 7.2
SCCS-vsn: sys/ufs/ffs/ffs_subr.c 7.4
SCCS-vsn: sys/vm/vm_swap.c 7.2
SCCS-vsn: sys/kern/kern_physio.c 7.3
21 files changed:
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)kern_exec.c 7.3.1.1 (Berkeley) %G%
+ * @(#)kern_exec.c 7.4 (Berkeley) %G%
*/
#include "../machine/reg.h"
*/
#include "../machine/reg.h"
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)kern_physio.c 7.2.1.1 (Berkeley) %G%
+ * @(#)kern_physio.c 7.3 (Berkeley) %G%
*/
#include "../machine/pte.h"
*/
#include "../machine/pte.h"
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)vfs_bio.c 7.1.1.1 (Berkeley) %G%
+ * @(#)vfs_bio.c 7.2 (Berkeley) %G%
*/
#include "../machine/pte.h"
*/
#include "../machine/pte.h"
/*
* Insure that no part of a specified block is in an incore buffer.
/*
* Insure that no part of a specified block is in an incore buffer.
+#ifdef SECSIZE
+ * "size" is given in device blocks (the units of b_blkno).
+#endif SECSIZE
#ifdef SECSIZE
* "size" is given in device blocks (the units of b_blkno).
#endif SECSIZE
#ifdef SECSIZE
* "size" is given in device blocks (the units of b_blkno).
#endif SECSIZE
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)vfs_cluster.c 7.1.1.1 (Berkeley) %G%
+ * @(#)vfs_cluster.c 7.2 (Berkeley) %G%
*/
#include "../machine/pte.h"
*/
#include "../machine/pte.h"
/*
* Insure that no part of a specified block is in an incore buffer.
/*
* Insure that no part of a specified block is in an incore buffer.
+#ifdef SECSIZE
+ * "size" is given in device blocks (the units of b_blkno).
+#endif SECSIZE
#ifdef SECSIZE
* "size" is given in device blocks (the units of b_blkno).
#endif SECSIZE
#ifdef SECSIZE
* "size" is given in device blocks (the units of b_blkno).
#endif SECSIZE
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)vfs_lookup.c 7.1.1.1 (Berkeley) %G%
+ * @(#)vfs_lookup.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ffs_alloc.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ffs_alloc.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ffs_balloc.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ffs_balloc.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ffs_inode.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ffs_inode.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ffs_subr.c 7.3.1.1 (Berkeley) %G%
+ * @(#)ffs_subr.c 7.4 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ffs_vfsops.c 7.2.1.1 (Berkeley) %G%
+ * @(#)ffs_vfsops.c 7.3 (Berkeley) %G%
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
+#include "ioctl.h"
+#include "disklabel.h"
+#include "stat.h"
if (error)
goto out;
needclose = 1;
if (error)
goto out;
needclose = 1;
+ if ((*bdevsw[major(dev)].d_ioctl)(dev, DIOCGPART,
+ (caddr_t)&dpart, FREAD) == 0) {
+ havepart = 1;
+ size = dpart.disklab->d_secsize;
+ } else
+ size = DEV_BSIZE;
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
+ if (havepart) {
+ dpart.part->p_fstype = FS_BSDFFS;
+ dpart.part->p_fsize = fs->fs_fsize;
+ dpart.part->p_frag = fs->fs_frag;
+ fs->fs_dbsize = size;
+ }
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
return (fs);
out:
if (error == 0)
return (fs);
out:
if (error == 0)
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
+ if (needclose)
+ (void) closei((dev_t)ip->i_rdev, IFBLK,
+ ronly? FREAD : FREAD|FWRITE);
if (ip)
iput(ip);
if (mp)
if (ip)
iput(ip);
if (mp)
register struct inode *ip;
register struct fs *fs;
register struct inode *ip;
register struct fs *fs;
+ forcibly = 0; /* XXX */
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ufs_inode.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ufs_inode.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ufs_lookup.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ufs_lookup.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ufs_vfsops.c 7.2.1.1 (Berkeley) %G%
+ * @(#)ufs_vfsops.c 7.3 (Berkeley) %G%
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
+#include "ioctl.h"
+#include "disklabel.h"
+#include "stat.h"
if (error)
goto out;
needclose = 1;
if (error)
goto out;
needclose = 1;
+ if ((*bdevsw[major(dev)].d_ioctl)(dev, DIOCGPART,
+ (caddr_t)&dpart, FREAD) == 0) {
+ havepart = 1;
+ size = dpart.disklab->d_secsize;
+ } else
+ size = DEV_BSIZE;
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
+ if (havepart) {
+ dpart.part->p_fstype = FS_BSDFFS;
+ dpart.part->p_fsize = fs->fs_fsize;
+ dpart.part->p_frag = fs->fs_frag;
+ fs->fs_dbsize = size;
+ }
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
return (fs);
out:
if (error == 0)
return (fs);
out:
if (error == 0)
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
+ if (needclose)
+ (void) closei((dev_t)ip->i_rdev, IFBLK,
+ ronly? FREAD : FREAD|FWRITE);
if (ip)
iput(ip);
if (mp)
if (ip)
iput(ip);
if (mp)
register struct inode *ip;
register struct fs *fs;
register struct inode *ip;
register struct fs *fs;
+ forcibly = 0; /* XXX */
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)lfs_alloc.c 7.1.1.1 (Berkeley) %G%
+ * @(#)lfs_alloc.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)lfs_balloc.c 7.1.1.1 (Berkeley) %G%
+ * @(#)lfs_balloc.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)lfs_inode.c 7.1.1.1 (Berkeley) %G%
+ * @(#)lfs_inode.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)lfs_vfsops.c 7.2.1.1 (Berkeley) %G%
+ * @(#)lfs_vfsops.c 7.3 (Berkeley) %G%
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
+#include "ioctl.h"
+#include "disklabel.h"
+#include "stat.h"
if (error)
goto out;
needclose = 1;
if (error)
goto out;
needclose = 1;
+ if ((*bdevsw[major(dev)].d_ioctl)(dev, DIOCGPART,
+ (caddr_t)&dpart, FREAD) == 0) {
+ havepart = 1;
+ size = dpart.disklab->d_secsize;
+ } else
+ size = DEV_BSIZE;
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
+ if (havepart) {
+ dpart.part->p_fstype = FS_BSDFFS;
+ dpart.part->p_fsize = fs->fs_fsize;
+ dpart.part->p_frag = fs->fs_frag;
+ fs->fs_dbsize = size;
+ }
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
return (fs);
out:
if (error == 0)
return (fs);
out:
if (error == 0)
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
+ if (needclose)
+ (void) closei((dev_t)ip->i_rdev, IFBLK,
+ ronly? FREAD : FREAD|FWRITE);
if (ip)
iput(ip);
if (mp)
if (ip)
iput(ip);
if (mp)
register struct inode *ip;
register struct fs *fs;
register struct inode *ip;
register struct fs *fs;
+ forcibly = 0; /* XXX */
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ufs_inode.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ufs_inode.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ufs_lookup.c 7.1.1.1 (Berkeley) %G%
+ * @(#)ufs_lookup.c 7.2 (Berkeley) %G%
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)ufs_vfsops.c 7.2.1.1 (Berkeley) %G%
+ * @(#)ufs_vfsops.c 7.3 (Berkeley) %G%
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
#include "ioctl.h"
#include "disklabel.h"
#include "stat.h"
+#include "ioctl.h"
+#include "disklabel.h"
+#include "stat.h"
if (error)
goto out;
needclose = 1;
if (error)
goto out;
needclose = 1;
+ if ((*bdevsw[major(dev)].d_ioctl)(dev, DIOCGPART,
+ (caddr_t)&dpart, FREAD) == 0) {
+ havepart = 1;
+ size = dpart.disklab->d_secsize;
+ } else
+ size = DEV_BSIZE;
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
#ifdef SECSIZE
/*
* If possible, determine hardware sector size
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
fs->fs_ronly = (ronly != 0);
if (ronly == 0)
fs->fs_fmod = 1;
+ if (havepart) {
+ dpart.part->p_fstype = FS_BSDFFS;
+ dpart.part->p_fsize = fs->fs_fsize;
+ dpart.part->p_frag = fs->fs_frag;
+ fs->fs_dbsize = size;
+ }
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
#ifdef SECSIZE
/*
* If we have a disk label, force per-partition
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
fs->fs_npsect = MAX(fs->fs_npsect, fs->fs_nsect); /* XXX */
fs->fs_interleave = MAX(fs->fs_interleave, 1); /* XXX */
return (fs);
out:
if (error == 0)
return (fs);
out:
if (error == 0)
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
if (needclose)
(void) closei((dev_t)ip->i_rdev, IFBLK,
ronly? FREAD : FREAD|FWRITE);
+ if (needclose)
+ (void) closei((dev_t)ip->i_rdev, IFBLK,
+ ronly? FREAD : FREAD|FWRITE);
if (ip)
iput(ip);
if (mp)
if (ip)
iput(ip);
if (mp)
register struct inode *ip;
register struct fs *fs;
register struct inode *ip;
register struct fs *fs;
+ forcibly = 0; /* XXX */
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
forcibly = 0; /* XXX */
error = getmdev(&dev, fname);
if (error)
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)vm_swap.c 7.1.1.1 (Berkeley) %G%
+ * @(#)vm_swap.c 7.2 (Berkeley) %G%
#include "uio.h"
#include "file.h"
#include "stat.h"
#include "uio.h"
#include "file.h"
#include "stat.h"
swfree(index)
int index;
{
swfree(index)
int index;
{
+ register struct swdevt *sp;
register struct swdevt *sp;
register swblk_t vsbase;
register long blk;
register struct swdevt *sp;
register swblk_t vsbase;
register long blk;
register swblk_t dvbase;
register int nblks;
int error;
register swblk_t dvbase;
register int nblks;
int error;
sp = &swdevt[index];
dev = sp->sw_dev;
sp = &swdevt[index];
dev = sp->sw_dev;
*/
rmfree(swapmap, blk - ctod(CLSIZE),
vsbase + ctod(CLSIZE));
*/
rmfree(swapmap, blk - ctod(CLSIZE),
vsbase + ctod(CLSIZE));
+ } else if (dvbase == 0) {
+ /*
+ * Don't use the first cluster of the device
+ * in case it starts with a label or boot block.
+ */
+ rmfree(swapmap, blk - ctod(CLSIZE),
+ vsbase + ctod(CLSIZE));
} else
rmfree(swapmap, blk, vsbase);
}
return (0);
} else
rmfree(swapmap, blk, vsbase);
}
return (0);