Page MenuHomeFreeBSD

sobomax (Maksym Sobolyev)
User

Projects

User Details

User Since
Jan 29 2016, 5:27 AM (557 w, 4 d)

Recent Activity

Yesterday

sobomax updated the diff for D60204: ufs: do not busy the mount point in ufs_sync_nlink1().

@kib right, it is not needed either. A successful vn_start_write() keeps the mount reference that VOP_GETWRITEMOUNT() took until vn_finished_write() drops it. All three callers are between the two:

Mon, Oct 5, 6:44 AM
sobomax updated the summary of D60355: ufs: undo the new parent's link when ufs_rename() cannot rewrite "..".
Mon, Oct 5, 4:02 AM
sobomax updated the summary of D60355: ufs: undo the new parent's link when ufs_rename() cannot rewrite "..".
Mon, Oct 5, 4:02 AM
sobomax requested review of D60355: ufs: undo the new parent's link when ufs_rename() cannot rewrite "..".
Mon, Oct 5, 3:58 AM
sobomax updated the diff for D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.

@kib OK, done. ffs_sync_alloc() is gone, and an allocating O_SYNC/O_DSYNC write finishes with ffs_syncvnode() again, as in the revision before last (DATA_ONLY for O_DSYNC, still only when the write changed i_blocks).

Mon, Oct 5, 3:45 AM

Sun, Oct 4

sobomax committed rGa127039dd0c2: stress2: add a reproducer for the flush_newblk_dep() "Bad newblk" panic (authored by sobomax).
stress2: add a reproducer for the flush_newblk_dep() "Bad newblk" panic
Sun, Oct 4, 7:27 PM
sobomax committed rG479c98287ee6: ffs: revalidate mkdir dependencies after vnode lookup (authored by sobomax).
ffs: revalidate mkdir dependencies after vnode lookup
Sun, Oct 4, 7:27 PM
sobomax closed D59356: ffs: revalidate mkdir dependencies after vnode lookup.
Sun, Oct 4, 7:27 PM · Contributor Reviews (src)

Fri, Oct 2

sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1382368, @pho wrote:
In D59356#1381929, @kib wrote:

I think this is fine. I suggest asking Peter to do the full stress2 run with the patch applied.

Hey @pho can you do this? Thanks!

Sure. I have been running tests for a day with D59356.188224.patch added. A full test usually takes 2 1/2 days on my test HW.

Fri, Oct 2, 4:41 PM · Contributor Reviews (src)
sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1382368, @pho wrote:
In D59356#1381929, @kib wrote:

I think this is fine. I suggest asking Peter to do the full stress2 run with the patch applied.

Hey @pho can you do this? Thanks!

Sure. I have been running tests for a day with D59356.188224.patch added. A full test usually takes 2 1/2 days on my test HW.

Fri, Oct 2, 4:38 PM · Contributor Reviews (src)
sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1381929, @kib wrote:

I think this is fine. I suggest asking Peter to do the full stress2 run with the patch applied.

Fri, Oct 2, 12:36 PM · Contributor Reviews (src)

Thu, Oct 1

sobomax committed rG43b0384bc7e8: mountpoint(1): new utility, implemented as a stat(1) hardlink (authored by sobomax).
mountpoint(1): new utility, implemented as a stat(1) hardlink
Thu, Oct 1, 9:26 PM
sobomax closed D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT.
Thu, Oct 1, 9:26 PM
sobomax requested review of D60204: ufs: do not busy the mount point in ufs_sync_nlink1().
Thu, Oct 1, 4:52 PM
sobomax committed rGa68d11d310dd: stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh (authored by sobomax).
stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh
Thu, Oct 1, 4:28 PM
sobomax closed D60136: stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh.
Thu, Oct 1, 4:28 PM
sobomax updated the diff for D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT.
  • usr.bin/stat/stat.1:86 ("'as reported ...' is an implementation detail") ---
Thu, Oct 1, 4:22 PM
sobomax added a reviewer for D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT: kib.
Thu, Oct 1, 5:22 AM
sobomax added a comment to D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT.

@kib reimplemented atop SFBSD_MNTPOINT and made into a stat(1) alias. Please re-review, thanks!

Thu, Oct 1, 5:07 AM
sobomax updated the diff for D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT.
Thu, Oct 1, 5:06 AM

Wed, Sep 30

sobomax added a comment to D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.

@kib can you please flush this down the pipe since everyone seems in agreement, so it unblocks the D59906? 🙏

Wed, Sep 30, 5:44 PM
sobomax added a comment to D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT.
Wed, Sep 30, 5:43 PM
sobomax accepted D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.
Wed, Sep 30, 5:41 PM
sobomax added reviewers for D60139: fsck_ffs: do not rescan lost+found for every reconnected inode: markj, brooks, rlibby.
Wed, Sep 30, 5:40 PM
sobomax updated the summary of D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.
Wed, Sep 30, 5:37 PM
sobomax updated the summary of D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.
Wed, Sep 30, 5:36 PM
sobomax updated the summary of D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.
Wed, Sep 30, 5:36 PM
sobomax updated the summary of D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.
Wed, Sep 30, 5:32 PM
sobomax updated the diff for D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.

@kib agreed, that was not proportional. The new revision replaces the ffs_syncvnode() call with a targeted flush, ffs_sync_alloc(), that only makes the pointers to the written range durable:

Wed, Sep 30, 5:11 PM
sobomax updated the diff for D59356: ffs: revalidate mkdir dependencies after vnode lookup.

Thanks, all three addressed in the update. Every restart of the dependency selection now goes through the EJUSTRETURN return to flush_pagedep_deps(), and nothing is kept on the private unfinished list while the softdep lock is dropped for a restart.

Wed, Sep 30, 4:50 PM · Contributor Reviews (src)
sobomax updated the diff for D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.

@kib thanks, updated.

Wed, Sep 30, 5:34 AM
sobomax committed rGa179e72489f8: ufs: report a mismatched ".." in ufs_dirrewrite() (authored by sobomax).
ufs: report a mismatched ".." in ufs_dirrewrite()
Wed, Sep 30, 5:13 AM
sobomax closed D60137: ufs: report why rewriting ".." failed in rename.
Wed, Sep 30, 5:13 AM
sobomax updated the diff for D60137: ufs: report why rewriting ".." failed in rename.

@kib Thanks, both done in the update:

Wed, Sep 30, 4:10 AM

Tue, Sep 29

sobomax updated the diff for D60139: fsck_ffs: do not rescan lost+found for every reconnected inode.

Add missing src.opts.mk.

Tue, Sep 29, 7:21 PM
sobomax updated the summary of D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.
Tue, Sep 29, 6:36 PM
sobomax retitled D60136: stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh from Title: stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh to stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh.
Tue, Sep 29, 6:23 PM
sobomax requested review of D60139: fsck_ffs: do not rescan lost+found for every reconnected inode.
Tue, Sep 29, 6:01 PM
sobomax updated the summary of D60137: ufs: report why rewriting ".." failed in rename.
Tue, Sep 29, 5:41 PM
sobomax requested review of D60137: ufs: report why rewriting ".." failed in rename.
Tue, Sep 29, 5:39 PM
sobomax updated the summary of D60136: stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh.
Tue, Sep 29, 5:34 PM
sobomax added a reviewer for D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable: mckusick.
Tue, Sep 29, 5:29 PM
sobomax updated the summary of D59356: ffs: revalidate mkdir dependencies after vnode lookup.
Tue, Sep 29, 5:26 PM · Contributor Reviews (src)
sobomax updated the summary of D59356: ffs: revalidate mkdir dependencies after vnode lookup.
Tue, Sep 29, 5:25 PM · Contributor Reviews (src)
sobomax requested review of D60136: stress2: Fix script bugs in gnop6.sh, gnop7.sh and fdatasync*.sh.
Tue, Sep 29, 5:19 PM
sobomax requested review of D60134: ufs: make fdatasync(2), O_SYNC and O_DSYNC writes durable.
Tue, Sep 29, 4:56 PM
sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.

@kib updated as requested, thanks

Tue, Sep 29, 4:35 PM · Contributor Reviews (src)
sobomax updated the diff for D59356: ffs: revalidate mkdir dependencies after vnode lookup.

Updated, relative to the previous revision (874f9dd09fea):

Tue, Sep 29, 4:31 PM · Contributor Reviews (src)

Mon, Sep 28

sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1378462, @pho wrote:

Nice test scenario!
Reproduced: https://people.freebsd.org/~pho/stress/log/log0694.txt
As mkdir_blkreuse.sh is a shebang script, the file must have the x bit set.

Mon, Sep 28, 4:57 PM · Contributor Reviews (src)
sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1375508, @kib wrote:

@pho I tried to coerce ChatGPT Codex to write a reproducer, but it keep refusing claiming that's a security concern. I will try maybe to rephrase it as writing a "unit test to validate the fix."

Peter is exceptionally good in creating the test scenarios.

I suggest you to explain the workload in more details, at the low level. I.e. instead of saying 'we install set of packages on memory disk' say something like 'we create UFS on swap-backed(?) md(4) volume of that size, with SU (or SU+J?) enabled, then create that deep file hierarchy and create that many files, each of that size'.

Mon, Sep 28, 6:10 AM · Contributor Reviews (src)
sobomax updated the diff for D59356: ffs: revalidate mkdir dependencies after vnode lookup.

Add a reproducer, worth $30 of Claude Fable credits.

Mon, Sep 28, 5:33 AM · Contributor Reviews (src)

Wed, Sep 23

sobomax added a comment to D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.

P.S. Perhaps bump __FreeBSD_version? Since there is no other way to probe if the kernel supports this feature or not.

Wed, Sep 23, 7:08 PM
sobomax accepted D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.
Wed, Sep 23, 6:56 PM
sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.

@pho I tried to coerce ChatGPT Codex to write a reproducer, but it keep refusing claiming that's a security concern. I will try maybe to rephrase it as writing a "unit test to validate the fix."

Wed, Sep 23, 6:54 PM · Contributor Reviews (src)
sobomax requested changes to D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.

New flag needs to be documented in the stat(2).

Wed, Sep 23, 6:38 PM
sobomax committed rG72e391060bb6: stat(2): Document st_bsdflags and SFBSD_NAMEDATTR (authored by sobomax).
stat(2): Document st_bsdflags and SFBSD_NAMEDATTR
Wed, Sep 23, 6:37 PM
sobomax closed D59915: Document st_bsdflags and SFBSD_NAMEDATTR in the stat(2).
Wed, Sep 23, 6:37 PM
sobomax added inline comments to D59915: Document st_bsdflags and SFBSD_NAMEDATTR in the stat(2).
Wed, Sep 23, 6:29 PM
sobomax updated the diff for D59915: Document st_bsdflags and SFBSD_NAMEDATTR in the stat(2).

Incorporate @kib suggestions.

Wed, Sep 23, 3:01 PM

Tue, Sep 22

sobomax added a comment to D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.
In D59910#1374935, @kib wrote:

something along those lines:

Sure, documenting st_bsdflags would be useful. I suggest you to create a review for the diff, I have some notes.

Tue, Sep 22, 6:58 PM
sobomax requested review of D59915: Document st_bsdflags and SFBSD_NAMEDATTR in the stat(2).
Tue, Sep 22, 6:58 PM
sobomax committed rG26b3ff1f5c4b: Ignore LINUX_POLLREMOVE (authored by sobomax).
Ignore LINUX_POLLREMOVE
Tue, Sep 22, 6:38 PM
sobomax closed D59914: Silence "LINUX_POLLREMOVE is not supported" warning.
Tue, Sep 22, 6:38 PM
sobomax added a reviewer for D59914: Silence "LINUX_POLLREMOVE is not supported" warning: emulation.
Tue, Sep 22, 6:03 PM
sobomax requested review of D59914: Silence "LINUX_POLLREMOVE is not supported" warning.
Tue, Sep 22, 6:02 PM
sobomax added a reviewer for D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag: sobomax.

something along those lines:

Tue, Sep 22, 5:57 PM
sobomax added a comment to D59910: stat(2): report mount points using st_bsdflags SFBSD_MNTPOINT flag.

Looks good, however maybe it's time to document both st_bsdflags member and its respective values in the stat(2) as non-portable interface?

Tue, Sep 22, 5:51 PM
sobomax requested review of D59906: mountpoint(1): new utility, implemented as a stat(1) hardlink using SFBSD_MNTPOINT.
Tue, Sep 22, 3:33 PM

Sep 5 2026

sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1363271, @pho wrote:
In D59356#1363214, @kib wrote:

From the first look, this is fine.
I believe the next step is to help Peter (pho@) to create the reproducer, and get the stress2 testing.
Also, please wait for Kirk' feedback.

That would be nice. I have been seeing the panic a few times over the years, but not after Feb 10 2021.

Sep 5 2026, 10:11 PM · Contributor Reviews (src)

Sep 4 2026

sobomax updated the diff for D59356: ffs: revalidate mkdir dependencies after vnode lookup.

Rework to preserve dependencies as suggested by @kib

Sep 4 2026, 6:54 PM · Contributor Reviews (src)
sobomax updated subscribers of D59356: ffs: revalidate mkdir dependencies after vnode lookup.
Sep 4 2026, 6:16 PM · Contributor Reviews (src)
sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.
In D59356#1362256, @kib wrote:

The new 'find' logic essentially reorders the processing of the newblk dependencies, and I am not sure that this is fine in this case (it is generally not).

IMO the correct solution for the race in flush_pagedep_deps() as described in the summary is to memoize the vnode returned by get_parent_vp(), and then restart the global loop. When you see the MKDIR_BODY dependency, and the inode number matches the memoized result from get_parent_vp(), you can process it without relocking sd_fslock, which closes the race. If the vp is NULL or does not match the inode number, you vput() it, call get_parent_vp(), and restart the loop.

Sep 4 2026, 3:56 AM · Contributor Reviews (src)

Sep 3 2026

sobomax added a comment to D59356: ffs: revalidate mkdir dependencies after vnode lookup.

Some of the facts supporting this diagnosis:

Sep 3 2026, 8:48 PM · Contributor Reviews (src)
sobomax requested review of D59356: ffs: revalidate mkdir dependencies after vnode lookup.
Sep 3 2026, 8:38 PM · Contributor Reviews (src)

Apr 2 2026

sobomax added reviewers for D46614: Improve panic/KASSERT: make source code location info non-optional: imp, olce.
Apr 2 2026, 12:06 AM
sobomax updated the diff for D46614: Improve panic/KASSERT: make source code location info non-optional.
  • fix buildworld
  • added KASSERT_PANIC_NOCONTEXT option allowing to avoid compiling extra location strings
  • made format a bit closer to what MPASS4() would produce today
  • improve wording on panic(9) and update KASSERT(9) to match.
Apr 2 2026, 12:03 AM

Apr 1 2026

sobomax updated the summary of D46614: Improve panic/KASSERT: make source code location info non-optional.
Apr 1 2026, 10:49 PM
sobomax updated the summary of D46614: Improve panic/KASSERT: make source code location info non-optional.
Apr 1 2026, 10:49 PM
sobomax updated the summary of D46614: Improve panic/KASSERT: make source code location info non-optional.
Apr 1 2026, 10:49 PM
sobomax updated the summary of D46614: Improve panic/KASSERT: make source code location info non-optional.
Apr 1 2026, 10:47 PM
sobomax closed D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME.
Apr 1 2026, 9:50 PM
sobomax committed rG5d4a39d8ed77: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME (authored by sobomax).
compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME
Apr 1 2026, 9:50 PM

Mar 31 2026

sobomax added a comment to D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME.

The code placement is ad-hoc. We already have a case for IPPROTO_TCP in the main switch and the new option handling should go there. This will require some extension of linux_to_bsd_tcp_sockopt() but the result would be cleaner code.

Mar 31 2026, 5:50 AM
sobomax updated the diff for D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME.

Implement suggestions from @glebius

Mar 31 2026, 5:50 AM

Mar 30 2026

sobomax requested review of D56168: compat/linux: map TCP_USER_TIMEOUT sockopt into TCP_MAXUNACKTIME.
Mar 30 2026, 5:26 PM
sobomax added a comment to D44872: Use LTO/symbol versioning to optimize (de-clutter) boot bits and pieces.

Here is updated savings table:

Mar 30 2026, 5:14 PM
sobomax updated the diff for D44872: Use LTO/symbol versioning to optimize (de-clutter) boot bits and pieces.

All weak symbols are now gone.

Mar 30 2026, 5:11 PM
sobomax updated the diff for D44872: Use LTO/symbol versioning to optimize (de-clutter) boot bits and pieces.

Refresh with the latest -CURRENT. Get rid of the --whole-archive, with the latest toolchain the linking now works properly in both LTO and non-LTO mode.

Mar 30 2026, 5:03 PM

Dec 17 2025

sobomax accepted D54269: netinet: fix checksum calculation bug.
Dec 17 2025, 5:39 PM

Nov 5 2025

sobomax committed rG222ea8bff5db: mksnap_ffs: fix running unded chroot (authored by sobomax).
mksnap_ffs: fix running unded chroot
Nov 5 2025, 7:57 PM
sobomax committed rG0bd5fb421a1e: mksnap_ffs: fix running unded chroot (authored by sobomax).
mksnap_ffs: fix running unded chroot
Nov 5 2025, 7:16 AM
sobomax committed rG7f4c2bf8ea6c: netinet: provide "at offset" variant of the in_delayed_cksum() API (authored by sobomax).
netinet: provide "at offset" variant of the in_delayed_cksum() API
Nov 5 2025, 7:16 AM
sobomax committed rG5b062c9458e8: ng_nat: fix potential crash when attaching to L2 directly (authored by sobomax).
ng_nat: fix potential crash when attaching to L2 directly
Nov 5 2025, 7:16 AM

Sep 23 2025

sobomax committed rG60be0d71daab: mksnap_ffs: fix running unded chroot (authored by sobomax).
mksnap_ffs: fix running unded chroot
Sep 23 2025, 4:28 PM
sobomax closed D52670: mksnap_ffs: fix running under chroot.
Sep 23 2025, 4:28 PM

Sep 21 2025

sobomax requested review of D52670: mksnap_ffs: fix running under chroot.
Sep 21 2025, 9:46 PM

Aug 28 2025

sobomax committed rG05fe8c88e1ce: libc: lib_malloc_aligned(): add a missing NULL check (authored by sobomax).
libc: lib_malloc_aligned(): add a missing NULL check
Aug 28 2025, 1:56 PM
sobomax committed rGc73d3c6c960b: mbuf: improve KASSERT(9) falure messages in the m_apply() (authored by sobomax).
mbuf: improve KASSERT(9) falure messages in the m_apply()
Aug 28 2025, 1:56 PM
sobomax committed rG55403c7c559c: build: fix list-old-dirs / check-old-dirs (authored by sobomax).
build: fix list-old-dirs / check-old-dirs
Aug 28 2025, 1:11 AM

Aug 26 2025

sobomax committed rGf74c0dc583d6: ng_nat: fix potential crash when attaching to L2 directly (authored by sobomax).
ng_nat: fix potential crash when attaching to L2 directly
Aug 26 2025, 4:37 AM