The NetBSD Project

CVS log for src/tests/fs/vfs/t_renamerace.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / fs / vfs

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Jan 31 17:23:37 2022 UTC (2 years, 11 months ago) by ryo
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -2 lines
Extend the time to wait for the thread to quit.

It seems that alarm(1) is not enough time for the thread to actually exit after quittingtime = 1.
It randomly failed with "Test program received signal 14" on a slow environment.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Nov 27 15:23:33 2021 UTC (3 years, 1 month ago) by gson
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +7 -1 lines
Force failure of the nfs_renamerace_cycle, p2k_ffs_renamerace_cycle,
and puffs_renamerace_cycle test cases as they fail only randomly or
only on some systems.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Oct 23 17:43:08 2021 UTC (3 years, 2 months ago) by hannken
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -36 lines
After converting msdosfs_rename() to use genfs_sane_rename() the
MSDOS tests should pass.

Tested on QEMU/nvmm archs i386 and amd64.

Should resolve PR kern/43626 (directory renaming more than a little racy)

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Jun 16 23:58:07 2021 UTC (3 years, 7 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +6 -1 lines
tests/fs/vfs: Mark udf_renamerace_cycle flaky, PR kern/56253.

Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Sun Sep 13 12:25:29 2020 UTC (4 years, 4 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +107 -1 lines
Pull up following revision(s) (requested by riastradh in ticket #1083):

	sys/miscfs/genfs/genfs_rename.c: revision 1.5
	tests/fs/vfs/t_renamerace.c: revision 1.37
	tests/fs/vfs/t_renamerace.c: revision 1.38

tests/fs/vfs/t_renamerace: Test a screw case hannken@ found.

genfs_rename: Fix deadlocks in cross-directory cyclic rename.

Reproducer:
A: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
    rmdir("c/d/e"); rmdir("c/d"); }
B: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
    rename("c", "c/d/e"); }
C: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
    rename("c/d/e", "c"); }

Deadlock:
- A holds c and wants to lock d; and either
- B holds . and d and wants to lock c, or
- C holds . and d and wants to lock c.

The problem with these is that genfs_rename_enter_separate in B or C
tried lock order .->d->c->e (in A/B, fdvp->tdvp->fvp->tvp; in A/C,
tdvp->fdvp->tvp->fvp) which violates the ancestor->descendant order
.->c->d->e.

The resolution is to change B to do fdvp->fvp->tdvp->tvp and C to do
tdvp->tvp->fdvp->fvp.  But there's an edge case: tvp and fvp might be
the same (hard links), and we can't detect that until after we've
looked them both up -- and in some file systems (I'm looking at you,
ufs), there is no mere lookup operation, only lookup-and-lock, so we
can't even hold the lock on one of tvp or fvp when we look up the
other one if there's a chance they might be the same.

Fortunately the cases
(a) tvp = fvp
(b) tvp or fvp is a directory
are mutually exclusive as long as directories cannot be hard-linked.

In case (a) we can just defer locking {tvp, fvp} until the end, because
it can't possibly have {fdvp or fvp, tdvp or tvp} as descendants.  In
case (b) we can just lock them in the order fdvp->fvp->tdvp->tvp or
tdvp->tvp->fdvp->fvp if the first one of {fvp, tvp} is a directory,
because it can't possibly coincide with the second one of {fvp, tvp}.

With this change, we can now prove that the locking order is consistent
with the ancestor->descendant partial ordering.  Where two nodes are
incommensurate under that partial ordering, they are only ever locked
by rename and there is only ever one rename at a time.

Proof:
- For same-directory renames, genfs_rename_enter_common locks the
  directory first and then the children.  The order
  directory->child[i] is consistent with ancestor->descendant and
  child[0]/child[1] are incommensurate.
- For cross-directory renames:
  . While a rename is in progress and the fs-wide rename lock is held,
    directories can be created or removed but not changed, so the
    outcome of gro_genealogy -- which, given fdvp and tdvp, returns
    the node N relating fdvp/N/.../tdvp or null if there is none --
    can only transition from finding N to not finding N, if one of
    the directories is removed while any of the vnodes are unlocked.
    Merely creating directories cannot change the ancestry of tdvp,
    and concurrent renames are not possible.
    Thus, if a gro_genealogy determined the operation to have the
    form fdvp/N/.../tdvp, then it might cease to have that form, but
    only because tdvp was removed which will harmlessly cause the
    rename to fail later on.  Similarly, if gro_genealogy determined
    the operation _not_ to have the form fdvp/N/.../tdvp then it
    can't begin to have that form until after the rename has
    completed.
    The lock order is,
    => for fdvp/.../tdvp:
       1. lock fdvp
       2. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
       3. lock fvp if a directory (consistent with fdvp->fvp)
       4. lock tdvp (consistent with fdvp->tdvp and possibly fvp->tdvp)
       5. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
       6. lock fvp if a nondirectory (fvp->t* or fvp->fdvp is impossible)
       7. lock tvp if not fvp (tvp->f* is impossible unless tvp=fvp)
    => for incommensurate fdvp & tdvp, or for tdvp/.../fdvp:
       1. lock tdvp
       2. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
       3. lock tvp if a directory (consistent with tdvp->tvp)
       4. lock fdvp (either incommensurate with tdvp and/or tvp, or
          consistent with tdvp(->tvp)->fdvp)
       5. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
       6. lock tvp if a nondirectory (tvp->f* or tvp->tdvp is impossible)
       7. lock fvp if not tvp (fvp->t* is impossible unless fvp=tvp)

Deadlocks found by hannken@; resolution worked out with dholland@.

XXX I think we could improve concurrency somewhat -- with a likely
big win for applications like tar and rsync that create many files
with temporary names and then rename them to the permanent one in the
same directory -- by making vfs_renamelock a reader/writer lock: any
number of same-directory renames, or exactly one cross-directory
rename, at any one time.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Sep 5 02:55:39 2020 UTC (4 years, 4 months ago) by riastradh
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -1 lines
Revert "ufs: Prevent mkdir from choking on deleted directories."

This change made no sense and should not have been committed.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Sep 5 02:47:49 2020 UTC (4 years, 4 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +1 -3 lines
ufs: Prevent mkdir from choking on deleted directories.

Fix some missing uvm_vnp_setsize in screw cases while here.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Sep 5 02:47:03 2020 UTC (4 years, 4 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +1 -9 lines
genfs_rename: Fix deadlocks in cross-directory cyclic rename.

Reproducer:

A: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
    rmdir("c/d/e"); rmdir("c/d"); }
B: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
    rename("c", "c/d/e"); }
C: for (;;) { mkdir("c", 0600); mkdir("c/d", 0600); mkdir("c/d/e", 0600);
    rename("c/d/e", "c"); }

Deadlock:

- A holds c and wants to lock d; and either
- B holds . and d and wants to lock c, or
- C holds . and d and wants to lock c.

The problem with these is that genfs_rename_enter_separate in B or C
tried lock order .->d->c->e (in A/B, fdvp->tdvp->fvp->tvp; in A/C,
tdvp->fdvp->tvp->fvp) which violates the ancestor->descendant order
.->c->d->e.

The resolution is to change B to do fdvp->fvp->tdvp->tvp and C to do
tdvp->tvp->fdvp->fvp.  But there's an edge case: tvp and fvp might be
the same (hard links), and we can't detect that until after we've
looked them both up -- and in some file systems (I'm looking at you,
ufs), there is no mere lookup operation, only lookup-and-lock, so we
can't even hold the lock on one of tvp or fvp when we look up the
other one if there's a chance they might be the same.

Fortunately the cases
(a) tvp = fvp
(b) tvp or fvp is a directory
are mutually exclusive as long as directories cannot be hard-linked.
In case (a) we can just defer locking {tvp, fvp} until the end, because
it can't possibly have {fdvp or fvp, tdvp or tvp} as descendants.  In
case (b) we can just lock them in the order fdvp->fvp->tdvp->tvp or
tdvp->tvp->fdvp->fvp if the first one of {fvp, tvp} is a directory,
because it can't possibly coincide with the second one of {fvp, tvp}.

With this change, we can now prove that the locking order is consistent
with the ancestor->descendant partial ordering.  Where two nodes are
incommensurate under that partial ordering, they are only ever locked
by rename and there is only ever one rename at a time.

Proof:

- For same-directory renames, genfs_rename_enter_common locks the
  directory first and then the children.  The order
  directory->child[i] is consistent with ancestor->descendant and
  child[0]/child[1] are incommensurate.

- For cross-directory renames:

  . While a rename is in progress and the fs-wide rename lock is held,
    directories can be created or removed but not changed, so the
    outcome of gro_genealogy -- which, given fdvp and tdvp, returns
    the node N relating fdvp/N/.../tdvp or null if there is none --
    can only transition from finding N to not finding N, if one of
    the directories is removed while any of the vnodes are unlocked.
    Merely creating directories cannot change the ancestry of tdvp,
    and concurrent renames are not possible.

    Thus, if a gro_genealogy determined the operation to have the
    form fdvp/N/.../tdvp, then it might cease to have that form, but
    only because tdvp was removed which will harmlessly cause the
    rename to fail later on.  Similarly, if gro_genealogy determined
    the operation _not_ to have the form fdvp/N/.../tdvp then it
    can't begin to have that form until after the rename has
    completed.

    The lock order is,

    => for fdvp/.../tdvp:
       1. lock fdvp
       2. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
       3. lock fvp if a directory (consistent with fdvp->fvp)
       4. lock tdvp (consistent with fdvp->tdvp and possibly fvp->tdvp)
       5. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
       6. lock fvp if a nondirectory (fvp->t* or fvp->fdvp is impossible)
       7. lock tvp if not fvp (tvp->f* is impossible unless tvp=fvp)

    => for incommensurate fdvp & tdvp, or for tdvp/.../fdvp:
       1. lock tdvp
       2. lookup(/lock/unlock) tvp (consistent with tdvp->tvp)
       3. lock tvp if a directory (consistent with tdvp->tvp)
       4. lock fdvp (either incommensurate with tdvp and/or tvp, or
          consistent with tdvp(->tvp)->fdvp)
       5. lookup(/lock/unlock) fvp (consistent with fdvp->fvp)
       6. lock tvp if a nondirectory (tvp->f* or tvp->tdvp is impossible)
       7. lock fvp if not tvp (fvp->t* is impossible unless fvp=tvp)

Deadlocks found by hannken@; resolution worked out with dholland@.

XXX I think we could improve concurrency somewhat -- with a likely
big win for applications like tar and rsync that create many files
with temporary names and then rename them to the permanent one in the
same directory -- by making vfs_renamelock a reader/writer lock: any
number of same-directory renames, or exactly one cross-directory
rename, at any one time.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sat Sep 5 02:45:22 2020 UTC (4 years, 4 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +115 -1 lines
tests/fs/vfs/t_renamerace: Test a screw case hannken@ found.

Revision 1.34.14.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:24 2020 UTC (4 years, 9 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.34.14.1: preferred, colored; branchpoint 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.14.1: +2 -2 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Aug 17 09:44:01 2019 UTC (5 years, 5 months ago) by gson
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
The udf_renamerace test case no longer fails due to PR kern/49046, but
it does fail due to PR kern/53865 on real hardware.

Revision 1.34.14.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:10:01 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -2 lines
Sync with HEAD

Revision 1.34.12.1: download - view: text, markup, annotated - select for diffs
Fri Jan 18 08:50:59 2019 UTC (6 years ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +6 -2 lines
Synch with HEAD

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Jan 13 14:35:00 2019 UTC (6 years ago) by gson
Branches: MAIN
CVS tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +6 -2 lines
Mark the fs/vfs/t_renamerace:udf_renamerace_dirs test case as an
expected failure referencing PR kern/53865, and force failure to avoid
reports of unexpected success as it does not realiably fail under
qemu.  This makes the treatment of udf_renamerace_dirs the same as
that of udf_renamerace, only with a different PR.  Also, make
whitespace consistent between the two.

Revision 1.33.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:57 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.33: preferred, colored; next MAIN 1.34: preferred, colored
Changes since revision 1.33: +2 -2 lines
Sync with HEAD

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Jan 13 21:30:40 2017 UTC (8 years ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-base, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi, pgoyette-compat
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
Don't play with "../.." in includes for h_macros.h; deal with it centrally.
Minor fixes.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed May 4 08:30:22 2016 UTC (8 years, 8 months ago) by dholland
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Cite a relevant PR for msdos_renamerace instead of one that was fixed
several years ago.

Revision 1.26.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:48 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.26.2.1: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.2.1: +11 -0 lines
Rebase to HEAD as of a few days ago.

Revision 1.30.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:57:08 2014 UTC (10 years, 5 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30: +5 -6 lines
Rebase.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Jul 29 09:15:48 2014 UTC (10 years, 5 months ago) by gson
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +6 -1 lines
Mark the udf_renamerace test case (but not udf_renamerace_dirs) as an
expected failure again, now with a reference to PR kern/49046.
Since the test only fails part of the time, force failure to
avoid failure reports reports due to unexpected success.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Jul 25 13:44:59 2014 UTC (10 years, 5 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +1 -7 lines
Remove atf_tc_expect_fail() calls for udf file-system.  These tests are
currently passing.  As discussed on current-users.  Any new failures
should be reported via send-pr.

Revision 1.24.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:19 2014 UTC (10 years, 8 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.24.2.2: preferred, colored; branchpoint 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.2: +25 -1 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Jan 9 13:23:57 2014 UTC (11 years ago) by hannken
Branches: MAIN
CVS tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +7 -1 lines
Operation sysvbfs_remove() destructs inodes attached to active vnodes.
Defer the destruction to sysvbfs_reclaim().

Disable test t_renamerace:sysvbfs_renamerace as it will exhaust the
inode table (sysvbfs has space for 8 inodes only).

Ok: Izumi Tsutsui <tsutsui@netbsd.org>

Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Jul 10 18:55:00 2013 UTC (11 years, 6 months ago) by reinoud
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -5 lines
Update test cases for UDF now udf_rename() uses the genfs_rename framework

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Jul 8 06:44:51 2013 UTC (11 years, 6 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +9 -1 lines
Cover the last failing UDF test cases with a reference to PR kern/47986, i.e.
all rename's fail until UDF switches over to the new rename framework solving
the locking mechanism.

Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:28:56 2013 UTC (11 years, 7 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +13 -1 lines
resync from head

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Mar 17 02:48:31 2013 UTC (11 years, 10 months ago) by jmmv
Branches: MAIN
CVS tags: agc-symver-base, agc-symver
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +13 -1 lines
Fix the t_renamerace:lfs_renamerace_dirs test on fast machines.

This test was failing on my machine when run natively but not causing any
problems when run within qemu, and the failure was "mkdir: No space left
on device".

My understanding of the issue is that this test overflowed the temporary
disk image due to its high rate of file churn and the lfs_cleanerd not
being able to keep up.  Note that this test is capped by time, not number
of operations, so this is why the problem does not show up in a slow
emulated system.

To fix this, just bump the test file system image limit a little bit.
(I tried increasing the frequency at which lfs_cleanerd does its thing,
but it wasn't enough.)

Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:08:21 2012 UTC (12 years, 8 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.24.2.1: preferred, colored; branchpoint 1.24: preferred, colored
Changes since revision 1.24.2.1: +3 -13 lines
sync with head.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed May 9 00:22:26 2012 UTC (12 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5
Branch point for: tls-maxphys
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -13 lines
Adjust t_renamerace now that ext2fs and ffs have good rename.

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:09:04 2012 UTC (12 years, 9 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -13 lines
sync with head

Revision 1.24.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 17 17:40:08 2012 UTC (12 years, 10 months ago) by bouyer
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +3 -13 lines
Pull up following revision(s) (requested by perseant in ticket #116):
	sys/ufs/lfs/lfs_alloc.c: revision 1.112
	tests/fs/vfs/t_rmdirrace.c: revision 1.9
	tests/fs/vfs/t_renamerace.c: revision 1.25
	sys/ufs/lfs/lfs_vnops.c: revision 1.240
	sys/ufs/lfs/lfs_segment.c: revision 1.224
	sys/ufs/lfs/lfs_bio.c: revision 1.122
	sys/ufs/lfs/lfs_vfsops.c: revision 1.294
	sbin/newfs_lfs/make_lfs.c: revision 1.19
	sys/ufs/lfs/lfs.h: revision 1.136
Pass t_renamerace and t_rmdirrace tests.
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582.  Address several
other MP locking issues discovered during the course of investigating the
same problem.
Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.
Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).

Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Feb 16 02:47:56 2012 UTC (12 years, 11 months ago) by perseant
Branches: MAIN
CVS tags: yamt-pagecache-base4
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -13 lines
Pass t_renamerace and t_rmdirrace tests.

Adapt dholland@'s fix to ufs_rename to fix PR kern/43582.  Address several
other MP locking issues discovered during the course of investigating the
same problem.

Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.

Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Oct 8 13:08:54 2011 UTC (13 years, 3 months ago) by njoly
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base
Branch point for: yamt-pagecache, netbsd-6
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -4 lines
Slightly adjust skipped messages, makes output more consistent.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Jul 18 06:47:08 2011 UTC (13 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -5 lines
ffs and ffslog are no longer xfail.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Mar 14 19:05:19 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +12 -2 lines
Apparently this way of triggering the msdosfs rename vnode leak
does not bite every time (most commonly observed on the amd64/qemu
runs), so add a race condition catcher.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Mar 6 16:00:16 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +7 -1 lines
Add a race catcher for p2k_ffs renamerace -- it seems like the
problem doesn't trigger always especially in a qemu env (but triggers
100% of the time on my desktop).

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:55 2011 UTC (13 years, 10 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18: +4 -4 lines
Sync with HEAD

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Mar 3 11:01:27 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -1 lines
The re-enabled renamerace test also triggers the recent msdosfs
vnode leak.  xfail this under the blanket of PR kern/44661.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Mar 3 10:57:30 2011 UTC (13 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -4 lines
Apparently my last commit to msdosfs_vnops.c fixed the (harmless?)
buffer overrun in rename (>15 years old bug), so re-enable other
msdosfs rename tests too.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Jan 11 09:32:50 2011 UTC (14 years ago) by pooka
Branches: MAIN
CVS tags: bouyer-quota2-base
Branch point for: bouyer-quota2
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -2 lines
need unrace-catcher for ffslog

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Jan 7 12:18:25 2011 UTC (14 years ago) by pooka
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -2 lines
xfail PR kern/44336

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Jan 7 11:53:23 2011 UTC (14 years ago) by pooka
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
ffs -o log dies in renamerace_dirs just like the rest.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Jan 2 12:58:17 2011 UTC (14 years ago) by pooka
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
+ rump_lwproc_newproc -> rump_lwproc_rfork()
+ add a tess for rump_lwproc_rfork()

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Nov 11 17:44:44 2010 UTC (14 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +7 -1 lines
skip tests which use features which rumpfs does not support
(namely: vop_rename and a file system size limit)

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Nov 1 14:04:02 2010 UTC (14 years, 2 months ago) by pooka
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -1 lines
Create the process we use later in the test.  Otherwise cwd doesn't
go right and the test fails because of attempting to create files
in the wrong directory.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Sep 1 19:41:28 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +8 -4 lines
update to new rump lwp/proc interfaces

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Aug 26 18:06:44 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +9 -14 lines
chdir() once per process is enough, no need to do it for every
thread (and doing so would cause occasional failures when some
thread would cd out of the test mountpoint while another thread
was still running in there).

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Aug 26 15:07:16 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -9 lines
Put the workaround for PR kern/43799 into the common nfs unmount routine.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Aug 25 18:11:20 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +22 -7 lines
Start many more threads for the renamerace since it seems to catch
more errors.

Add a sleepkludge to deal with NFS's sillyrename brokenness.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jul 16 19:16:41 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -1 lines
Some of the msdosfs tests are killed by SSP due to stack limit
being exceeded.  I cannot figure out what is going on by code
reading, nor repeat this either on my desktop or in qemu, so skip
those tests for msdosfs until I can get to the bottom of it.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Jul 16 14:14:27 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -1 lines
skip directory test on sysvbfs

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 16 13:07:23 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Fix typo in comment.  comment tested by wizd.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Jul 16 11:46:31 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
Fill in PR kern/43626 now that it exists.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Jul 16 11:33:45 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +49 -1 lines
Do the famous renamerace test using directories.  Uh oh, bad idea.
PR coming soon.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Jul 16 10:50:55 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +8 -1 lines
This test does not always fail for LFS, so apply same kludge as
elsewhere while waiting for atf to grow support for these cases.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed Jul 14 21:44:40 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
xfail test on lfs.  It goes badaboom faster than you can find your
multipass.  Borrow PR kern/43582 used earlier for rmdirrace, as it
looks pretty much like the same problem.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Jul 14 21:39:31 2010 UTC (14 years, 6 months ago) by pooka
Branches: MAIN
Convert "The Original" rename race test from to vfs and retire the
ffs/tmpfs versions.  The only difference is that the origamical
one mounted ffs with MNT_LOG (and therein actually lay the bug).

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>