FFS

共 3 篇文章。

也许可以给ufs(FFS)加个hack?

Kernel

UFS的目录项中的文件名字段是定长的(参见sys/ufs/dir.h),这样也许我们可以把symlink的内容(如果够短的话)保存到目录项,而不是inode所指定的fragment上,从而访问symlink可以节省最多两次I/O操作。

参与评论

RAID-5 Disaster on InfoTrend based TOYOU SATA disk array

Hardware

And finally, it happend.

On Monday, one of our server, running FreeBSD, panic’ed with “ffs_clusteralloc: map mismatch”. This message is quite uncommon and should only happen when there is some “event” with the memory or hard disk.

I have suggested our administrator to reboot and do “fsck” on the volume, since it has very small block size and can not be checked background (I have made a change to warn about this to FreeBSD, and was MFC’ed to 5-STABLE so you will get the feature in 5.4-RELEASE). Unfortunatelly, the check is so slow and we start to suspect whether there is some hardware problem.

阅读全文… ( 本文约 296 字,阅读大致需要 2 分钟 )

Is this a problem?

Kernel

While reading the snapshot code in FFS Soft Updates’s FreeBSD implementation, I got a question about the following code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
		/*
		 * If there is a fragment, clear it here.
		 */
		blkno = 0;
		loc = howmany(xp->i_size, fs->fs_bsize) - 1;
		if (loc < NDADDR) {
			__len = fragroundup(fs, blkoff(fs, xp->i\_size));__
			if (len < fs->fs_bsize) {
				ffs_blkfree(copy_fs, vp, DIP(xp, i_db[loc]),
				    len, xp->i_number);
				blkno = DIP(xp, i_db[loc]);
				DIP_SET(xp, i_db[loc], 0);
			}
		}
阅读全文… ( 本文约 141 字,阅读大致需要 1 分钟 )