UFS

共 16 篇文章。

FreeBSD snapshotting/background fsck improvement idea

• Kernel
  1. We should not caclucate the superblock summary, since it can at most lag 30 seconds’ change, and doing the caclucate is painful delay. What we should do is to transfer the responsibility to background fsck
  2. newfs(8) should warn about the snapshot is actually unable to create, in case fssize is greater than maxfilesize.

The patch for 1) is available at http://people.freebsd.org/~delphij/ffs/patch-sbsummary. I will work on 2) shortly, as it’s quite simpler than 1).

参与评论

How to optimize your FS?

• Kernel

It turns out that we have to optimize our FS before benchmarking. I have read some articles and maillist archives so I got some impression:

  1. Give correct parameters to newfs(1)
    avgfilesize, filesperdir, will control DIRPERF hashing.

  2. Turn on noatime mounts.

  3. etc.

Just make a note.

参与评论

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 分钟 )

lock problem triggered by umount

• Kernel

I have just tried to umount /usr on my test box in order to get all outstanding writes to be sync’ed to disk (as Kirk McKusick said, the umount system call will do true sync of a file system).

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