SCCS-vsn: sys/ufs/ffs/ffs_alloc.c 7.10
SCCS-vsn: sys/ufs/lfs/lfs_alloc.c 7.10
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ffs_alloc.c 7.9 (Berkeley) %G%
+ * @(#)ffs_alloc.c 7.10 (Berkeley) %G%
if (ino == 0)
goto noinodes;
error = iget(pip, ino, ipp);
if (ino == 0)
goto noinodes;
error = iget(pip, ino, ipp);
if (error) {
ifree(pip, ino, 0);
return (error);
}
if (error) {
ifree(pip, ino, 0);
return (error);
}
if (ip->i_mode) {
printf("mode = 0%o, inum = %d, fs = %s\n",
ip->i_mode, ip->i_number, fs->fs_fsmnt);
if (ip->i_mode) {
printf("mode = 0%o, inum = %d, fs = %s\n",
ip->i_mode, ip->i_number, fs->fs_fsmnt);
fs->fs_fsmnt, ino, ip->i_blocks);
ip->i_blocks = 0;
}
fs->fs_fsmnt, ino, ip->i_blocks);
ip->i_blocks = 0;
}
+ /*
+ * Set up a new generation number for this inode.
+ */
+ if (++nextgennumber < (u_long)time.tv_sec)
+ nextgennumber = time.tv_sec;
+ ip->i_gen = nextgennumber;
return (0);
noinodes:
fserr(fs, "out of inodes");
return (0);
noinodes:
fserr(fs, "out of inodes");
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)lfs_alloc.c 7.9 (Berkeley) %G%
+ * @(#)lfs_alloc.c 7.10 (Berkeley) %G%
if (ino == 0)
goto noinodes;
error = iget(pip, ino, ipp);
if (ino == 0)
goto noinodes;
error = iget(pip, ino, ipp);
if (error) {
ifree(pip, ino, 0);
return (error);
}
if (error) {
ifree(pip, ino, 0);
return (error);
}
if (ip->i_mode) {
printf("mode = 0%o, inum = %d, fs = %s\n",
ip->i_mode, ip->i_number, fs->fs_fsmnt);
if (ip->i_mode) {
printf("mode = 0%o, inum = %d, fs = %s\n",
ip->i_mode, ip->i_number, fs->fs_fsmnt);
fs->fs_fsmnt, ino, ip->i_blocks);
ip->i_blocks = 0;
}
fs->fs_fsmnt, ino, ip->i_blocks);
ip->i_blocks = 0;
}
+ /*
+ * Set up a new generation number for this inode.
+ */
+ if (++nextgennumber < (u_long)time.tv_sec)
+ nextgennumber = time.tv_sec;
+ ip->i_gen = nextgennumber;
return (0);
noinodes:
fserr(fs, "out of inodes");
return (0);
noinodes:
fserr(fs, "out of inodes");