-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add mount change detection design #594
Conversation
|
||
## Design | ||
|
||
The mount-points and filesystem info of a block device are found by the probe - *mountprobe*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the findmnt
manual page and it says it looks for mount points in /etc/fstab
, /etc/mtab
and /proc/self/mountinfo
. Just wondering if there's a reason NDM should look at fstab or mtab too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should be watching fstab/mtab. I took a look at findmnt
though. It provides an option to watch for changes (-p
). To implement this, it also uses the linux polling api and by default watches for changes in /proc/self/mountinfo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, that's good validation. We can add watching fstab/mtab if the need ever arises I suppose. Right now, don't see a reason we need it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a note in the design:
filesystem changes can be detected only once the device is mounted. If just format a filesystem on the device and does not mount it, it wont be updated.
@z0marlin Have one comment on using the existing mountprobe itself. everything else looks good. Can proceed with implementation
Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@z0marlin Please fix the typo.
Signed-off-by: Aditya Jain <aditya.jainadityajain.jain@gmail.com> Co-authored-by: Akhil Mohan <akhilerm@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Checklist:
<type>(<scope>): <subject>