Bug 497830
Summary: | 'df' doesn't wait for automount with indirect maps that use browse option | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Tomas Smetana <tsmetana> | ||||||
Component: | coreutils | Assignee: | Ondrej Vasik <ovasik> | ||||||
Status: | CLOSED ERRATA | QA Contact: | BaseOS QE <qe-baseos-auto> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5.3 | CC: | agk, cward, jscotka, meyering, rvokal, tao | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-09-02 09:17:24 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Tomas Smetana
2009-04-27 13:43:01 UTC
Created attachment 341431 [details]
Example patch
This is patch for the RHEL-5 coreutils that calls diropen() to mount the filesystem. Replacing diropen() with open() seems to work too. I'm not sure whether this is the best way to solve the problem but it looks to work OK.
Hi Tomas, It appears that automounters have changed since that part of df.c was written. Before, using "stat" was sufficient to cause the automounter to do its job. If "open" works, please use that, and then, upon success, use the resulting file descriptor in a call to fstat in place of the existing "stat" call. I.e., your patch is along the right lines, but use open instead of diropen. And declare any new variables (like int fd;) in the innermost scope possible. Please use these flags when calling open: O_RDONLY | O_NOCTTY | O_NONBLOCK It'd be great if you would submit the patch upstream, following guidelines in http://git.sv.gnu.org/cgit/coreutils.git/plain/HACKING Thanks! Actually, O_NONBLOCK is probably best omitted in this context. Created attachment 341439 [details]
Ian's patch rewritten according to Jim's instructions.
Upstream commit: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=dbd17157d7e693b8de9737f802db0e235ff5a3e6 ~~ Attention - RHEL 5.4 Beta Released! ~~ RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner! If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity. Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value. Questions can be posted to this bug or your customer or partner representative. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1262.html |