Project

General

Profile

Bug #2926

getfsstat() can return the wrong mounted FS count

Added by t_dfbsd almost 2 years ago. Updated 30 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/19/2016
Due date:
% Done:

0%

Estimated time:

getfsstat.patch (548 Bytes) getfsstat.patch t_dfbsd, 06/10/2018 06:02 PM

History

#1 Updated by t_dfbsd almost 2 years ago

If someone has spare cycles to tackle this, I'd really appreciate it. I won't bore you with the details, but it's forcing me to run a builder process that I have no control over in a DF instance on a VM and I'd like to move it to a dedicated physical machine.

#2 Updated by liweitianux about 1 month ago

The getfsstat() count problem as you reported can be seen from the different counts shown by mount(8) and lsvfs(1), and the main reason is due to the chroot from the initrd temporary root into the real root.

Please see more information in my email: http://lists.dragonflybsd.org/pipermail/users/2018-June/335759.html

Cheers,
Aaron

#3 Updated by t_dfbsd about 1 month ago

I think the problem is this commit: https://gitweb.dragonflybsd.org/dragonfly.git/commit/75ffff0d6f3520361771d057b364af7f81ebb36f

It checks for mount visibility when sfsp is uaf->buf, but doesn't when sfsp is null.

#4 Updated by tkusumi about 1 month ago

2018年6月10日(日) 0:14 <>:
>
> Issue #2926 has been updated by t_dfbsd.
>
>
> I think the problem is this commit: https://gitweb.dragonflybsd.org/dragonfly.git/commit/75ffff0d6f3520361771d057b364af7f81ebb36f

Not related this issue itself, but none of the filesystems added to
DragonFly after this commit (hammer1, devfs, tmpfs, hammer2, autofs,
etc) do what this commit says filesystems should do.
It's not a must anyway.

>
> It checks for mount visibility when sfsp is uaf->buf, but doesn't when sfsp is null.
>
> ----------------------------------------
> Bug #2926: getfsstat() can return the wrong mounted FS count
> http://bugs.dragonflybsd.org/issues/2926#change-13439
>
> * Author: t_dfbsd
> * Status: New
> * Priority: Normal
> * Assignee:
> * Category:
> * Target version:
> ----------------------------------------
> Per this discussion: http://lists.dragonflybsd.org/pipermail/users/2016-July/270749.html
>
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

#5 Updated by t_dfbsd about 1 month ago

Can someone take a look at this patch and commit of it's OK? Tested on both the normal install and an encrypted root install.

#6 Updated by dillon about 1 month ago

  • Status changed from New to Closed

Committed fix to master with 5c6a03baf163828d for both getfsstat() and getvfsstat(). Thanks!

-Matt

#7 Updated by t_dfbsd 30 days ago

Tested and it works, thanks!

Also available in: Atom PDF