kern/152079: [msdosfs] [patch] Small cleanups from the other
NetBSD/OpenBSD
Kostik Belousov
kostikbel at gmail.com
Sat Mar 26 09:58:14 UTC 2011
On Sat, Mar 26, 2011 at 10:09:16AM +0200, Mikolaj Golub wrote:
>
> On Fri, 25 Mar 2011 18:01:39 -0700 (PDT) Pedro F. Giffuni wrote:
>
> PFG> --- On Fri, 3/25/11, Kostik Belousov <kostikbel at gmail.com> wrote:
>
> PFG> ....
> >> No, I do not want it in our testing framework. I want to
> >> see a standalone test that demonstrates the issue.
> >> I think the leak is real, but want to have a way to
> >> reproduce it before committing.
> >>
> >> The diff you pointed out to t_vnops.c does not make much
> >> sense to me.
>
> PFG> I looked a little more in their records and I found this:
> PFG> _____
> PFG> ...
> PFG> /* rename directory over an empty directory */
> PFG> md(pb1, mp, "parent");
> PFG> md(pb2, mp, "parent/dir1");
> PFG> md(pb3, mp, "parent/dir2");
> PFG> RL(rump_sys_mkdir(pb1, 0777));
> PFG> RL(rump_sys_mkdir(pb2, 0777));
> PFG> RL(rump_sys_mkdir(pb3, 0777));
> PFG> RL(rump_sys_rename(pb2, pb3));
>
> PFG> RL(rump_sys_stat(pb1, &sb));
> PFG> ATF_CHECK_EQ(sb.st_nlink, 3);
> PFG> RL(rump_sys_rmdir(pb3));
> PFG> if (FSTYPE_TMPFS(tc))
> PFG> atf_tc_expect_signal(-1, "PR kern/44288");
> PFG> ______
>
> PFG> There's also this that was removed once the PR was fixed:
>
> PFG> - if (FSTYPE_MSDOS(tc))
> PFG> - atf_tc_skip("test fails in some setups, reason unknown");
>
> PFG> hope that helps.
>
> I suppose doing something like this on msdos fs:
>
> mkdir parent
> mkdir parent/1
> mv parent/1 parent/2
> ls -dl parent
>
> In the case of the leak we should see 4 in hard links number field instead of
> expected 3.
No, the supposed leak only affects the vnode usecount, and not the
inode hardlink count. The later is indeed reported as 1 for FreeBSD
implementation of msdosfs, AFAIR.
Probably, the only way to verify the case is to use debugger.
>
> But in FreeBSD it looks like msdosfs always reports link count 1:
>
> /dev/md1 on /mnt (msdosfs, local)
>
> [root at lolek ~]# cd /mnt/
> [root at lolek /mnt]# mkdir parent
> [root at lolek /mnt]# mkdir parent/1 parent/2 parent/3
> [root at lolek /mnt]# ls -ld parent
> drwxr-xr-x 1 root wheel 4096 Mar 26 11:56 parent
>
> Tested on 8-STABLE and CURRENT.
>
> --
> Mikolaj Golub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110326/fdfc9ccc/attachment.pgp
More information about the freebsd-fs
mailing list