In D30748#691785, @kib wrote:In D30748#691607, @jah wrote:In D30748#691229, @kib wrote:I think it is useful, if not required, to drain the taskqueue on unmount.
This could be helpful in making it more likely for non-forced unmounts to succeed if there have been very recent deletions. Would you consider that a requirement?
My motivation for the suggestion was that the module cannot be unloaded until taskqueue is drained, and it is logical to drain on unmount to ensure that unmount is actually completed, i.e. as much resources related to the filesystem is freed as possible.
But now I think that also you need to terminate and clean up the taskqueue thread on vfs module unload.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Jun 15 2021
Jun 15 2021
In D30748#691598, @jah wrote:In D30748#691212, @mjg wrote:If memory serves unionfs panics on mount if DEBUG_VFS_LOCKS is enabled, but the patch needs to be tested with it. I don't remember what stands in the way of fixing it, but bare minimum the triggering assert can be commented out for testing.
I didn't know we had DEBUG_VFS_LOCKS. My guess is that unionfs under stress will fail these checks in a variety of ways, but hopefully none of them will be caused by this change. This seems like another useful tool for evaluating unionfs, so I'll give it a shot as soon as I get some time.
Jun 14 2021
Jun 14 2021
In D30748#691229, @kib wrote:I think it is useful, if not required, to drain the taskqueue on unmount.
In D30748#691212, @mjg wrote:If memory serves unionfs panics on mount if DEBUG_VFS_LOCKS is enabled, but the patch needs to be tested with it. I don't remember what stands in the way of fixing it, but bare minimum the triggering assert can be commented out for testing.
Jun 13 2021
Jun 13 2021
FIFO processing for the deferred list
Use dedicated taskqueue, use STAILQ_CONCAT to reduce list locking
Jun 12 2021
Jun 12 2021
This is a naive approach. Instead of using a taskqueue, would I be better of with something completely different? For example, could I just stop holding a reference to the parent and instead lookup the parent through namei in the relatively small number of cases where unionfs needs the parent? Or, if the taskqueue is an acceptable approach, should I instead use a dedicated taskqueue instead of funneling everything through taskqueue_thread?
Jun 6 2021
Jun 6 2021
jah committed rG59409cb90fc0: Add a generic mechanism for preventing forced unmount (authored by jah).
Add a generic mechanism for preventing forced unmount
May 30 2021
May 30 2021
jah committed rGa4b07a2701f5: VFS_QUOTACTL(9): allow implementation to indicate busy state changes (authored by jah).
VFS_QUOTACTL(9): allow implementation to indicate busy state changes
jah added a comment to D30556: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
In D30556#686216, @markj wrote:In D30556#686194, @jah wrote:This is the same change you've already reviewed, with 2 exceptions:
--explicit inclusion of sys/types.h for _KERNEL builds from sys/mount.h, to avoid relying on coincidentally getting the header from elsewhere.
--inclusion of stdbool.h for libprocstat modules whose use of kernel headers otherwise defeats the definition of type bool.For the second issue, I would be willing to drop the libprocstat changes and instead use _Bool in VFS_QUOTACTL() if anyone insists on it. However, my personal preference is strongly for 'bool' over '_Bool' as a matter of style, and we seem to be slowly standardizing on 'bool' in the kernel. My take is that we shouldn't need to warp KPIs in order to accommodate userspace code that does sketchy things with kernel headers, especially when the code doing said sketchy things can employ a simple workaround.
I tend to agree that we should avoid mixing _Bool and bool in the kernel. It's just confusing. The change you proposed is ok with me, with the caveat that a similar modification may be needed in a small number of ports that do something like libprocstat (lsof is the main one that comes to mind). I'm ok with kib's suggestions as well.
jah added a comment to D30556: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
This is the same change you've already reviewed, with 2 exceptions:
--explicit inclusion of sys/types.h for _KERNEL builds from sys/mount.h, to avoid relying on coincidentally getting the header from elsewhere.
--inclusion of stdbool.h for libprocstat modules whose use of kernel headers otherwise defeats the definition of type bool.
jah requested review of D30556: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah added a reverting change for rG54256e7954d7: Fix userspace build after commit 6d3e78ad6c11: rG271fcf1c28ef: Revert commits 6d3e78ad6c11 and 54256e7954d7.
Revert commits 6d3e78ad6c11 and 54256e7954d7
May 29 2021
May 29 2021
Fix userspace build after commit 6d3e78ad6c11
jah committed rG6d3e78ad6c11: VFS_QUOTACTL(9): allow implementation to indicate busy state changes (authored by jah).
VFS_QUOTACTL(9): allow implementation to indicate busy state changes
May 25 2021
May 25 2021
jah updated the diff for D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
Add comments around unbusying requirements, chase __FreeBSD_version changes
Superseded by https://reviews.freebsd.org/D30401
Superseded by https://reviews.freebsd.org/D30401
Remove stray newline
Add and tweak various asserts
May 23 2021
May 23 2021
May 21 2021
May 21 2021
jah updated the diff for D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
unbusy the unionfs/nullfs mount before calling QUOTACTL on the lower FS
May 17 2021
May 17 2021
jah added inline comments to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah added a comment to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
In D30218#680984, @jah wrote:Add basic fixes for nullfs and unionfs, conditionalize ZFS changes
jah updated the diff for D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
Add basic fixes for nullfs and unionfs, conditionalize ZFS changes
jah added inline comments to D30263: nullfs: busy the lower mount before calling VFS_* operations on it.
May 16 2021
May 16 2021
jah added inline comments to D30263: nullfs: busy the lower mount before calling VFS_* operations on it.
May 15 2021
May 15 2021
jah added inline comments to D30263: nullfs: busy the lower mount before calling VFS_* operations on it.
jah added inline comments to D30263: nullfs: busy the lower mount before calling VFS_* operations on it.
jah added inline comments to D30263: nullfs: busy the lower mount before calling VFS_* operations on it.
jah added inline comments to D30263: nullfs: busy the lower mount before calling VFS_* operations on it.
May 14 2021
May 14 2021
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Replace vfs_ref() with simple atomic load of v_mount
jah added inline comments to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
May 13 2021
May 13 2021
jah added inline comments to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah added inline comments to D30152: unionfs: reference the underlying FS' mount objects when using them.
jah added inline comments to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah updated the diff for D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
Fix manpage formatting, remove leftover include, fix incorrect deleted line due to fingerslip
jah retitled D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes from Follow mount point unbusying requirements in vfs_stdquotactl() to VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Chase D30218
jah added inline comments to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah updated the diff for D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
Allow the implementation to direct busy state changes
In D30152#678936, @markj wrote:Do you plan to revise this change after changing the VFS_QUOTACTL interface? I'm just not sure whether to wait until that's done before re-reading this.
May 12 2021
May 12 2021
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Use correct variable when passing through VFS_QUOTACTL
May 11 2021
May 11 2021
jah added inline comments to D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah requested review of D30218: VFS_QUOTACTL(9): allow implementation to indicate busy state changes.
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Follow the unbusy requirements for vfs_quotactl()
May 10 2021
May 10 2021
jah added inline comments to D30152: unionfs: reference the underlying FS' mount objects when using them.
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Style
May 7 2021
May 7 2021
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Use atomic_load_ptr to enforce single load of vp->v_mount
jah updated the diff for D30152: unionfs: reference the underlying FS' mount objects when using them.
Apply vfs_busy, minor refactoring
In D30152#677009, @kib wrote:In D30152#677007, @jah wrote:In D30152#676937, @jah wrote:A simpler approach would be to directly store the underlying mount objects in struct unionfs_mount, vfs_ref() them on mount and vfs_rel() them on unmount.
But that would have the effect of blocking forcible unmount of the underlying filesystems in vfs_mount_destroy(). Meanwhile, the underlying FS' vnodes would still be flushed before this happens so the underlying filesystems would be no more usable than they are with this approach.In D30152#676980, @kib wrote:Taking a reference on the mount point does not prevent unmount. For instance, calling VFS_QUOTACTL() requires busying mp, which, if successful, prevents unmount until unbusy. In fact, busying fs is currently enforced by VFS_QUOTACTL protocol since UFS (the only actual quotactl provider) in some cases unbusies and then busies the mp.
It certainly doesn't prevent the unmount operations (vflush, etc) from happening, but doesn't it prevent the unmount system call from returning? That's what I observed in testing, and is corroborated by reading vfs_mount_destroy().
Why 'preventing syscall from returning' matters? What matters is that unmount destroys the private mount data pointed to by mnt_data. This data is usually vital for VFS_XXX() methods, and destroying/freeing it while these methods operate causes undefined behavior, a crash in the best case.
In D30152#676937, @jah wrote:A simpler approach would be to directly store the underlying mount objects in struct unionfs_mount, vfs_ref() them on mount and vfs_rel() them on unmount.
But that would have the effect of blocking forcible unmount of the underlying filesystems in vfs_mount_destroy(). Meanwhile, the underlying FS' vnodes would still be flushed before this happens so the underlying filesystems would be no more usable than they are with this approach.
May 6 2021
May 6 2021
A simpler approach would be to directly store the underlying mount objects in struct unionfs_mount, vfs_ref() them on mount and vfs_rel() them on unmount.
But that would have the effect of blocking forcible unmount of the underlying filesystems in vfs_mount_destroy(). Meanwhile, the underlying FS' vnodes would still be flushed before this happens so the underlying filesystems would be no more usable than they are with this approach.
jah requested review of D30152: unionfs: reference the underlying FS' mount objects when using them.
Mar 31 2021
Mar 31 2021
jah committed rG8dc8feb53da0: Clean up a couple of MD warts in vm_fault_populate(): (authored by jah).
Clean up a couple of MD warts in vm_fault_populate():
Mar 27 2021
Mar 27 2021
Adjust wording in comment, rearrange return value assertion
jah added inline comments to D28717: vm_page_grab*: Consolidate common logic into vm_page_grab_release().
Mar 21 2021
Mar 21 2021
Mar 17 2021
Mar 17 2021
Mar 16 2021
Mar 16 2021
factor out PT page allocation/freeing
Mar 14 2021
Mar 14 2021
Mar 13 2021
Mar 13 2021
Fix la57 table accounting
--remove unnecessary include
--add la57 bootstrap accounting
--further cleanup to improve code reuse
Revert accidentally-committed PCID counter removal, incorporate resident_count
Mar 10 2021
Mar 10 2021
Mar 9 2021
Mar 9 2021
jah committed rGe4b8deb22227: amd64 pmap: convert to counter(9), add PV and pagetable page counts (authored by jah).
amd64 pmap: convert to counter(9), add PV and pagetable page counts
Mar 3 2021
Mar 3 2021
In D28923#650048, @kib wrote:I probably should have been more explicit, I proposed to drop the pt_page_count at all. But I hope that you will follow up with pmap_pt_page_alloc() patch so this does not matter much.
jah updated the diff for D28923: amd64 pmap: convert to counter(9), add PV and pagetable page counts.
- Revert "Remove PCID save count, factor out PT page allocation/freeing"
- Fix NULL check in pmap_large_map_getptp_unlocked()
Mar 1 2021
Mar 1 2021
jah updated the diff for D28923: amd64 pmap: convert to counter(9), add PV and pagetable page counts.
- Remove PCID save count, factor out PT page allocation/freeing
Feb 27 2021
Feb 27 2021
jah added inline comments to D28923: amd64 pmap: convert to counter(9), add PV and pagetable page counts.
Feb 26 2021
Feb 26 2021
jah added inline comments to D28923: amd64 pmap: convert to counter(9), add PV and pagetable page counts.
Feb 25 2021
Feb 25 2021
jah added inline comments to D28923: amd64 pmap: convert to counter(9), add PV and pagetable page counts.